/* abilities.css — polished skill bar + ULT (superior touch targets & feedback) */

.ability-bar {
  position: absolute;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: 96px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 30;
  pointer-events: none;
}

.skill-btn {
  pointer-events: auto;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  border: 2.5px solid rgba(201, 162, 39, 0.7);
  background:
    linear-gradient(145deg, rgba(40, 36, 28, 0.95) 0%, rgba(12, 14, 16, 0.92) 100%);
  color: #e8dcc0;
  font-size: 24px;
  position: relative;
  padding: 0;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s;
  overflow: hidden;
}

.skill-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255, 230, 150, 0.12), transparent 55%);
  pointer-events: none;
  border-radius: 12px;
}

.skill-btn:hover:not(.on-cd) {
  border-color: rgba(240, 200, 80, 0.95);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.55),
    0 0 14px rgba(201, 162, 39, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.skill-btn:active:not(.on-cd) {
  transform: scale(0.9);
  background: linear-gradient(145deg, rgba(80, 65, 30, 0.95), rgba(30, 24, 12, 0.95));
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.5), inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.skill-btn.on-cd {
  opacity: 0.62;
  filter: grayscale(0.55) brightness(0.85);
  border-color: rgba(120, 110, 90, 0.45);
}

.skill-btn.is-basic {
  border-color: rgba(100, 180, 255, 0.55);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.55),
    0 0 10px rgba(80, 150, 255, 0.2);
}

.skill-icon {
  display: block;
  line-height: 58px;
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
  position: relative;
  z-index: 1;
}

.skill-cd {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-family: "VT323", monospace;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 3px #000, 0 0 6px #000;
  background: rgba(0, 0, 0, 0.48);
  border-radius: 12px;
  pointer-events: none;
  z-index: 2;
  letter-spacing: 0.5px;
}

.skill-btn:not(.on-cd) .skill-cd {
  display: none;
}

/* ULT button — big, satisfying */
#btn-ability,
.ability-btn.ult-btn {
  position: absolute;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3.5px solid #c9a227;
  background:
    radial-gradient(circle at 32% 28%, #8a6e2e 0%, #3a2e14 45%, #14100a 78%);
  color: #f0d878;
  font-size: 28px;
  z-index: 31;
  box-shadow:
    0 0 16px rgba(201, 162, 39, 0.4),
    0 6px 18px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 230, 150, 0.15);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

#btn-ability::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(240, 210, 100, 0.25);
  pointer-events: none;
}

#btn-ability .ult-icon {
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
}

#btn-ability.ult-ready {
  animation: ultPulse 0.85s ease-in-out infinite;
  box-shadow:
    0 0 24px rgba(201, 162, 39, 0.9),
    0 0 40px rgba(201, 162, 39, 0.35),
    0 6px 18px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 230, 150, 0.25);
  border-color: #f0d060;
}

#btn-ability.ult-charging {
  opacity: 0.78;
  filter: saturate(0.75);
}

#btn-ability:active {
  transform: scale(0.92);
}

@keyframes ultPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* Mobile / landscape refinements */
@media (orientation: landscape) and (max-height: 520px) {
  .ability-bar {
    bottom: 78px;
    right: 10px;
    gap: 8px;
  }
  .skill-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
    border-radius: 12px;
  }
  .skill-icon { line-height: 50px; }
  #btn-ability {
    width: 62px;
    height: 62px;
    font-size: 24px;
    bottom: 12px;
    right: 10px;
  }
}

@media (pointer: coarse) {
  .skill-btn {
    width: 62px;
    height: 62px;
  }
  .skill-icon { line-height: 62px; }
  #btn-ability {
    width: 78px;
    height: 78px;
  }
}
