/* ===== 20-skills.css : 主动技能系统（赛博朋克版） ===== */
.skill-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 2, 15, 0.85);
  z-index: 175;
  display: none;
  align-items: center; justify-content: center;
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
}
.skill-overlay.open { display: flex; }
.skill-box {
  position: relative;
  background: var(--cyber-bg-panel);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--cyber-border-glow);
  border-radius: 2px;
  padding: 28px 24px 24px;
  width: 92%; max-width: 640px;
  max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.3), 0 0 80px rgba(6, 182, 212, 0.1);
}
.skill-box::before, .skill-box::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  border: 2px solid var(--cyber-neon-purple);
  pointer-events: none;
}
.skill-box::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.skill-box::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.skill-title {
  font-size: 22px; font-weight: 700; color: var(--cyber-neon-purple-soft);
  text-align: center; margin-bottom: 14px;
  text-shadow: var(--cyber-glow-purple);
  font-family: var(--cyber-font-display);
  letter-spacing: 2px;
}
.skill-body { flex: 1; overflow-y: auto; padding-right: 4px; }
.skill-points-bar {
  text-align: center; font-size: 14px; color: var(--cyber-text-secondary);
  margin-bottom: 14px; padding: 10px;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 4px;
  font-family: var(--cyber-font-mono);
}
.skill-points-bar b { color: var(--cyber-neon-gold); font-size: 18px; text-shadow: 0 0 6px rgba(251, 191, 36, 0.5); }
.skill-points-hint { font-size: 11px; color: var(--cyber-text-muted); }
.skill-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.skill-card {
  position: relative;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.04), rgba(15, 8, 40, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 4px;
  padding: 12px;
  transition: all 0.2s;
}
.skill-card.is-active {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.1), rgba(6, 95, 70, 0.15));
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}
.skill-card-icon {
  font-size: 28px; text-align: center; margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}
.skill-card-name {
  font-size: 14px; font-weight: 700; color: var(--cyber-text-primary);
  text-align: center; margin-bottom: 2px;
  font-family: var(--cyber-font-display);
  letter-spacing: 0.3px;
}
.skill-card-key {
  font-size: 10px; color: var(--cyber-neon-purple-soft); text-align: center;
  font-family: var(--cyber-font-mono); margin-bottom: 6px;
  text-shadow: 0 0 4px rgba(168, 85, 247, 0.5);
}
.skill-card-desc {
  font-size: 11px; color: var(--cyber-text-secondary); text-align: center;
  margin-bottom: 8px; min-height: 30px;
  line-height: 1.4;
}
.skill-card-stats {
  display: flex; justify-content: space-around;
  font-size: 10px; color: var(--cyber-text-secondary); margin-bottom: 6px;
  padding: 4px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--cyber-border);
  border-radius: 2px;
  font-family: var(--cyber-font-mono);
}
.skill-card-level {
  text-align: center; font-size: 14px; color: var(--cyber-neon-gold);
  margin-bottom: 6px; letter-spacing: 2px;
  font-family: var(--cyber-font-display);
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}
.skill-status {
  text-align: center; font-size: 10px;
  padding: 3px 6px; border-radius: 2px;
  margin-bottom: 4px;
  font-family: var(--cyber-font-mono);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.skill-status.ready {
  color: var(--cyber-neon-green);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  text-shadow: 0 0 4px rgba(16, 185, 129, 0.5);
}
.skill-status.cd {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.skill-status.active {
  color: var(--cyber-neon-gold);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
  text-shadow: 0 0 4px rgba(251, 191, 36, 0.5);
  animation: skillStatusPulse 1s ease-in-out infinite;
}
@keyframes skillStatusPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(251, 191, 36, 0.3); }
  50% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.6); }
}
.skill-upgrade-btn {
  display: block; width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.7), rgba(88, 28, 135, 0.9));
  border: 1px solid rgba(168, 85, 247, 0.6);
  border-radius: 4px;
  color: #fff; font-size: 11px; font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--cyber-font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.skill-upgrade-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--cyber-glow-purple);
  border-color: var(--cyber-neon-purple);
}
.skill-upgrade-btn.cant {
  background: linear-gradient(180deg, #374151, #1f2937);
  border-color: rgba(75, 85, 99, 0.6);
  cursor: not-allowed;
  color: #9ca3af;
}
.skill-upgrade-btn.cant:hover { transform: none; box-shadow: none; }
.skill-maxed {
  text-align: center; font-size: 11px; color: var(--cyber-neon-gold);
  padding: 5px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 4px;
  font-weight: 600;
  font-family: var(--cyber-font-display);
  text-shadow: 0 0 4px rgba(251, 191, 36, 0.5);
  letter-spacing: 0.5px;
}
/* iter34：技能精通 */
.skill-mastery {
  margin-top: 6px; padding: 6px 8px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 4px;
  display: flex; flex-direction: column; gap: 5px; align-items: center;
}
.skill-mastery-label {
  font-size: 11px; color: #c084fc; font-weight: 600;
  text-shadow: 0 0 4px rgba(168, 85, 247, 0.5);
  letter-spacing: 0.3px;
}
.skill-mastery-maxed {
  font-size: 10px; color: #a78bfa; font-weight: 600; letter-spacing: 0.5px;
}
.skill-mastery-btn {
  width: 100%; padding: 4px 8px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 3px;
  color: #e9d5ff; font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  font-family: var(--cyber-font-display);
}
.skill-mastery-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(139, 92, 246, 0.25));
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
  transform: translateY(-1px);
}
.skill-mastery-btn.cant {
  opacity: 0.45; cursor: not-allowed; color: #9ca3af;
}
.skill-mastery-btn.cant:hover { transform: none; box-shadow: none; }

/* 技能栏 HUD（屏幕底部）— 抬高至 bottom:96px，与底部栏（top@76px）保持 20px 清晰间距，消除阴影互相遮挡 */
.skill-bar {
  position: fixed; bottom: 96px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 10px;
  z-index: 55;
  pointer-events: auto;
  padding: 8px 16px;
  background: var(--cyber-bg-panel);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  border: 1px solid var(--cyber-border);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}
.skill-slot {
  position: relative;
  width: 52px; height: 52px;
  background: linear-gradient(180deg, rgba(30, 15, 60, 0.95), rgba(10, 5, 25, 0.98));
  border: 2px solid rgba(168, 85, 247, 0.35);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  user-select: none;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}
.skill-slot::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.5s ease;
}
.skill-slot:hover::before { left: 100%; }
.skill-slot:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--cyber-neon-purple);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.6), 0 0 30px rgba(6, 182, 212, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.skill-slot.active {
  border-color: var(--cyber-neon-green);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255,255,255,0.08);
  animation: skillSlotActive 0.8s ease-in-out infinite;
}
@keyframes skillSlotActive {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.08); }
  50%      { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8), 0 0 35px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.12); }
}
.skill-slot-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.6)) drop-shadow(0 0 12px rgba(6, 182, 212, 0.3));
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.skill-slot:hover .skill-slot-icon {
  transform: translate(-50%, -50%) scale(1.15);
}
.skill-slot-key {
  position: absolute; top: 2px; right: 3px;
  font-size: 9px; font-weight: 800; color: var(--cyber-neon-purple-soft);
  background: rgba(5, 2, 15, 0.8); padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--cyber-font-mono);
  text-shadow: 0 0 4px rgba(168, 85, 247, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.2);
}
.skill-slot-cd {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 0%;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.3), rgba(5, 2, 15, 0.9));
  transition: height 0.15s linear;
  pointer-events: none;
}
.skill-slot-cd-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px; font-weight: 800; color: #fff;
  text-shadow: 0 0 6px rgba(168, 85, 247, 0.8), 0 0 12px rgba(168, 85, 247, 0.4);
  z-index: 2;
  font-family: var(--cyber-font-mono);
}
.skill-slot-level {
  position: absolute; bottom: 2px; left: 0; right: 0;
  text-align: center;
  font-size: 8px; color: var(--cyber-neon-gold); font-weight: 800;
  background: rgba(5, 2, 15, 0.85);
  font-family: var(--cyber-font-mono);
  text-shadow: 0 0 4px rgba(251, 191, 36, 0.6);
  border-top: 1px solid rgba(251, 191, 36, 0.2);
}
.skill-slot.cooling .skill-slot-icon,
.skill-slot.cooling .skill-slot-key { opacity: 0.4; }

.skill-slot-ring {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 3;
}
.skill-slot-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.skill-slot-ring-bg {
  fill: none;
  stroke: rgba(0,0,0,0.4);
  stroke-width: 3;
}
.skill-slot-ring-progress {
  fill: none;
  stroke: url(#skillRingGradient);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.2s linear;
  filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.6));
}

.skill-slot.cd-complete {
  animation: skillCdCompletePulse 0.6s ease-out;
}
@keyframes skillCdCompletePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.08);
    border-color: var(--cyber-neon-green);
  }
  30% {
    transform: scale(1.15);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.9), 0 0 40px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.12);
    border-color: #4ade80;
  }
  60% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  }
}

.skill-slot-cd-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 1;
}

.skill-slot-ready-glow {
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.3));
  background-size: 200% 200%;
  animation: skillReadyGlow 2s ease-in-out infinite;
}
.skill-slot:not(.cooling):not(.active) .skill-slot-ready-glow {
  opacity: 1;
}
@keyframes skillReadyGlow {
  0%, 100% { background-position: 0% 50%; opacity: 0.5; }
  50% { background-position: 100% 50%; opacity: 0.8; }
}
