/* 霓虹拳击 - Neon Boxing Styles */
:root {
  --bg-dark: #0a0a12;
  --bg-secondary: #12121f;
  --neon-cyan: #00f5ff;
  --neon-pink: #ff0080;
  --neon-yellow: #ffff00;
  --neon-green: #00ff88;
  --neon-orange: #ff6600;
  --text-white: #ffffff;
  --text-gray: #8888aa;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-dark);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Orbitron', sans-serif;
  overflow: hidden;
}

#game-container {
  width: 100%;
  max-width: 950px;
  padding: 20px;
}

.screen {
  width: 100%;
}

.screen.hidden {
  display: none;
}

/* Start Screen */
#start-screen {
  text-align: center;
  padding: 60px 20px;
}

.title-container {
  margin-bottom: 60px;
}

.game-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 48px;
  line-height: 1.4;
  margin-bottom: 20px;
}

.neon-text {
  display: block;
  color: var(--neon-cyan);
  text-shadow: 
    0 0 10px var(--neon-cyan),
    0 0 20px var(--neon-cyan),
    0 0 40px var(--neon-cyan),
    0 0 80px var(--neon-cyan);
  animation: flicker 2s infinite alternate;
}

.boxing-text {
  display: block;
  color: var(--neon-pink);
  text-shadow: 
    0 0 10px var(--neon-pink),
    0 0 20px var(--neon-pink),
    0 0 40px var(--neon-pink),
    0 0 80px var(--neon-pink);
  animation: flicker 3s infinite alternate-reverse;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
  }
  20%, 24%, 55% {
    opacity: 0.8;
  }
}

.subtitle {
  color: var(--text-gray);
  font-size: 18px;
  letter-spacing: 8px;
  text-transform: uppercase;
}

/* Difficulty Selector */
.difficulty-selector {
  margin-bottom: 50px;
}

.difficulty-label {
  color: var(--text-white);
  font-size: 16px;
  letter-spacing: 6px;
  margin-bottom: 25px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.difficulty-buttons {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.difficulty-btn {
  position: relative;
  background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
  border: 3px solid #2a2a3a;
  border-radius: 16px;
  padding: 20px 30px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  overflow: hidden;
}

.difficulty-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.difficulty-btn:hover {
  transform: translateY(-5px) scale(1.02);
}

/* 简单难度 - 绿色主题 */
.difficulty-btn[data-difficulty="easy"]:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.4), inset 0 0 20px rgba(0, 255, 136, 0.1);
}

.difficulty-btn[data-difficulty="easy"].active {
  border-color: var(--neon-green);
  background: linear-gradient(145deg, #0a2a1a, #051510);
  box-shadow: 
    0 0 40px rgba(0, 255, 136, 0.6),
    0 0 80px rgba(0, 255, 136, 0.3),
    inset 0 0 30px rgba(0, 255, 136, 0.2);
  animation: pulse-green 2s ease-in-out infinite;
}

.difficulty-btn[data-difficulty="easy"].active .diff-icon {
  filter: drop-shadow(0 0 10px var(--neon-green));
}

.difficulty-btn[data-difficulty="easy"].active .diff-name {
  color: var(--neon-green);
  text-shadow: 0 0 15px var(--neon-green), 0 0 30px var(--neon-green);
}

/* 普通难度 - 黄色主题 */
.difficulty-btn[data-difficulty="normal"]:hover {
  border-color: var(--neon-yellow);
  box-shadow: 0 0 30px rgba(255, 255, 0, 0.4), inset 0 0 20px rgba(255, 255, 0, 0.1);
}

.difficulty-btn[data-difficulty="normal"].active {
  border-color: var(--neon-yellow);
  background: linear-gradient(145deg, #2a2a0a, #151505);
  box-shadow: 
    0 0 40px rgba(255, 255, 0, 0.6),
    0 0 80px rgba(255, 255, 0, 0.3),
    inset 0 0 30px rgba(255, 255, 0, 0.2);
  animation: pulse-yellow 2s ease-in-out infinite;
}

.difficulty-btn[data-difficulty="normal"].active .diff-icon {
  filter: drop-shadow(0 0 10px var(--neon-yellow));
}

.difficulty-btn[data-difficulty="normal"].active .diff-name {
  color: var(--neon-yellow);
  text-shadow: 0 0 15px var(--neon-yellow), 0 0 30px var(--neon-yellow);
}

/* 困难难度 - 红色主题 */
.difficulty-btn[data-difficulty="hard"]:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 30px rgba(255, 0, 128, 0.4), inset 0 0 20px rgba(255, 0, 128, 0.1);
}

.difficulty-btn[data-difficulty="hard"].active {
  border-color: var(--neon-pink);
  background: linear-gradient(145deg, #2a0a1a, #150510);
  box-shadow: 
    0 0 40px rgba(255, 0, 128, 0.6),
    0 0 80px rgba(255, 0, 128, 0.3),
    inset 0 0 30px rgba(255, 0, 128, 0.2);
  animation: pulse-pink 2s ease-in-out infinite;
}

.difficulty-btn[data-difficulty="hard"].active .diff-icon {
  filter: drop-shadow(0 0 10px var(--neon-pink));
}

.difficulty-btn[data-difficulty="hard"].active .diff-name {
  color: var(--neon-pink);
  text-shadow: 0 0 15px var(--neon-pink), 0 0 30px var(--neon-pink);
}

/* 脉冲动画 */
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.6), 0 0 80px rgba(0, 255, 136, 0.3), inset 0 0 30px rgba(0, 255, 136, 0.2); }
  50% { box-shadow: 0 0 50px rgba(0, 255, 136, 0.8), 0 0 100px rgba(0, 255, 136, 0.4), inset 0 0 40px rgba(0, 255, 136, 0.3); }
}

@keyframes pulse-yellow {
  0%, 100% { box-shadow: 0 0 40px rgba(255, 255, 0, 0.6), 0 0 80px rgba(255, 255, 0, 0.3), inset 0 0 30px rgba(255, 255, 0, 0.2); }
  50% { box-shadow: 0 0 50px rgba(255, 255, 0, 0.8), 0 0 100px rgba(255, 255, 0, 0.4), inset 0 0 40px rgba(255, 255, 0, 0.3); }
}

@keyframes pulse-pink {
  0%, 100% { box-shadow: 0 0 40px rgba(255, 0, 128, 0.6), 0 0 80px rgba(255, 0, 128, 0.3), inset 0 0 30px rgba(255, 0, 128, 0.2); }
  50% { box-shadow: 0 0 50px rgba(255, 0, 128, 0.8), 0 0 100px rgba(255, 0, 128, 0.4), inset 0 0 40px rgba(255, 0, 128, 0.3); }
}

.diff-icon {
  font-size: 32px;
  transition: all 0.3s ease;
}

.difficulty-btn:not(.active) .diff-icon {
  opacity: 0.7;
  filter: grayscale(30%);
}

.diff-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #888;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.difficulty-btn.active .diff-name {
  font-weight: 900;
}

.diff-desc {
  font-size: 11px;
  color: #555;
  transition: color 0.3s ease;
}

.difficulty-btn.active .diff-desc {
  color: #888;
}

/* 选中标记 */
.difficulty-btn::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 16px;
  color: transparent;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.difficulty-btn.active::after {
  opacity: 1;
  transform: scale(1);
}

.difficulty-btn[data-difficulty="easy"].active::after {
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green);
}

.difficulty-btn[data-difficulty="normal"].active::after {
  color: var(--neon-yellow);
  text-shadow: 0 0 10px var(--neon-yellow);
}

.difficulty-btn[data-difficulty="hard"].active::after {
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
}

.start-prompt {
  margin-bottom: 50px;
}

.blink {
  color: var(--neon-yellow);
  font-size: 16px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.controls-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.control-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.key {
  background: linear-gradient(145deg, #2a2a3a, #1a1a2a);
  border: 2px solid var(--neon-cyan);
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--neon-cyan);
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  box-shadow: 
    0 0 5px var(--neon-cyan),
    inset 0 0 5px rgba(0, 245, 255, 0.2);
}

.control-desc {
  color: var(--text-gray);
  font-size: 14px;
}

/* Game Screen */
#game-screen {
  position: relative;
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  border-bottom: 2px solid rgba(255,255,255,0.1);
  margin-bottom: 10px;
}

.player-hud, .enemy-hud {
  width: 35%;
}

.enemy-hud {
  text-align: right;
}

.fighter-name {
  color: var(--text-white);
  font-size: 14px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.health-bar {
  height: 24px;
  background: rgba(0,0,0,0.6);
  border: 2px solid #333;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.health-fill {
  height: 100%;
  transition: width 0.3s ease;
  position: relative;
}

.player-health {
  width: 100%;
  background: linear-gradient(90deg, #00ff88, #00cc66);
  box-shadow: 0 0 10px #00ff88;
}

.enemy-health {
  width: 100%;
  float: right;
  background: linear-gradient(90deg, #ff6600, #ff3300);
  box-shadow: 0 0 10px #ff6600;
}

.health-text {
  color: var(--text-gray);
  font-size: 12px;
  margin-top: 5px;
  font-family: 'Press Start 2P', cursive;
}

.round-info {
  text-align: center;
}

.round-label {
  color: var(--neon-yellow);
  font-size: 12px;
  margin-bottom: 5px;
  text-shadow: 0 0 10px var(--neon-yellow);
}

.timer {
  color: var(--text-white);
  font-size: 36px;
  font-family: 'Press Start 2P', cursive;
  text-shadow: 0 0 20px var(--neon-cyan);
}

#game-canvas {
  display: block;
  margin: 0 auto;
  border: 3px solid var(--neon-pink);
  border-radius: 8px;
  box-shadow: 
    0 0 20px var(--neon-pink),
    inset 0 0 50px rgba(255,0,128,0.1);
}

.combo-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Press Start 2P', cursive;
  font-size: 32px;
  color: var(--neon-yellow);
  text-shadow: 
    0 0 10px var(--neon-yellow),
    0 0 20px var(--neon-yellow),
    0 0 40px var(--neon-yellow);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.damage-number {
  position: absolute;
  font-family: 'Press Start 2P', cursive;
  font-size: 24px;
  color: var(--neon-orange);
  text-shadow: 0 0 10px var(--neon-orange);
  pointer-events: none;
  opacity: 0;
}

/* Round End Screen */
#round-screen {
  text-align: center;
  padding: 100px 20px;
}

.round-result h2 {
  font-family: 'Press Start 2P', cursive;
  font-size: 28px;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px var(--neon-cyan);
  margin-bottom: 30px;
}

#round-outcome {
  font-size: 24px;
  color: var(--text-white);
  margin-bottom: 40px;
}

#round-outcome.win {
  color: var(--neon-green);
  text-shadow: 0 0 20px var(--neon-green);
}

#round-outcome.lose {
  color: var(--neon-pink);
  text-shadow: 0 0 20px var(--neon-pink);
}

/* Game Over Screen */
#gameover-screen {
  text-align: center;
  padding: 80px 20px;
}

.gameover-content h2 {
  font-family: 'Press Start 2P', cursive;
  font-size: 36px;
  margin-bottom: 40px;
}

#gameover-title.win {
  color: var(--neon-green);
  text-shadow: 
    0 0 10px var(--neon-green),
    0 0 20px var(--neon-green),
    0 0 40px var(--neon-green);
}

#gameover-title.lose {
  color: var(--neon-pink);
  text-shadow: 
    0 0 10px var(--neon-pink),
    0 0 20px var(--neon-pink),
    0 0 40px var(--neon-pink);
}

.final-score {
  margin-bottom: 50px;
}

.final-score p {
  font-size: 18px;
  color: var(--text-white);
  margin: 15px 0;
}

.final-score span {
  color: var(--neon-yellow);
  font-family: 'Press Start 2P', cursive;
}

/* Screen shake animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.3s ease-in-out;
}

/* Game Controls Panel */
.game-controls-panel {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 15px;
  padding: 15px 20px;
  background: linear-gradient(180deg, rgba(10,10,18,0.9) 0%, rgba(18,18,31,0.95) 100%);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 10px;
}

.control-section {
  flex: 1;
  padding: 12px 15px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
}

.control-header {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid;
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-header.player-color {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  text-shadow: 0 0 10px var(--neon-cyan);
}

.control-header.ai-color {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
}

.control-icon {
  font-size: 18px;
}

.control-keys {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.key-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-pair {
  display: flex;
  gap: 5px;
}

.key-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: linear-gradient(145deg, #2a2a3a, #1a1a2a);
  border: 2px solid var(--neon-cyan);
  border-radius: 6px;
  color: var(--neon-cyan);
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  box-shadow: 
    0 0 8px var(--neon-cyan),
    inset 0 0 5px rgba(0, 245, 255, 0.2);
  transition: all 0.2s;
}

.key-btn.jump {
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 
    0 0 8px var(--neon-green),
    inset 0 0 5px rgba(0, 255, 136, 0.2);
}

.key-btn.defense {
  border-color: var(--neon-yellow);
  color: var(--neon-yellow);
  box-shadow: 
    0 0 8px var(--neon-yellow),
    inset 0 0 5px rgba(255, 255, 0, 0.2);
}

.key-btn.attack {
  border-color: var(--neon-orange);
  color: var(--neon-orange);
  box-shadow: 
    0 0 8px var(--neon-orange),
    inset 0 0 5px rgba(255, 102, 0, 0.2);
}

.key-btn.roll {
  border-color: #ff00ff;
  color: #ff00ff;
  box-shadow: 
    0 0 8px #ff00ff,
    inset 0 0 5px rgba(255, 0, 255, 0.2);
}

.key-btn.mute-key {
  border-color: #888;
  color: #888;
  box-shadow: 
    0 0 5px #888,
    inset 0 0 5px rgba(136, 136, 136, 0.2);
}

.key-btn.combo {
  border-color: #ff00ff;
  color: #ff00ff;
  box-shadow: 
    0 0 8px #ff00ff,
    inset 0 0 5px rgba(255, 0, 255, 0.2);
  font-size: 8px;
  min-width: 55px;
}

.key-label {
  color: var(--text-gray);
  font-size: 11px;
}

.attack-section {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 10px;
  margin-top: 5px;
}

.attack-label-row {
  color: var(--text-white);
  font-size: 11px;
  margin-bottom: 8px;
  font-weight: 600;
}

.attacks {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.attack-key {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
}

.attack-key.special {
  background: rgba(255,0,255,0.1);
  border: 1px dashed rgba(255,0,255,0.3);
}

.attack-name {
  color: var(--text-white);
  font-size: 10px;
}

.attack-damage {
  color: var(--neon-orange);
  font-size: 9px;
  font-family: 'Press Start 2P', cursive;
}

/* AI Info Section */
.ai-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-desc {
  color: var(--text-gray);
  font-size: 12px;
  margin: 0;
}

.ai-skills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 5px 0;
}

.ai-skill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(255,0,128,0.1);
  border-radius: 4px;
  border: 1px solid rgba(255,0,128,0.2);
}

.skill-icon {
  font-size: 14px;
}

.skill-name {
  color: var(--text-white);
  font-size: 10px;
}

.ai-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-stat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-label {
  color: var(--text-gray);
  font-size: 11px;
  min-width: 70px;
}

.stat-bar {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-orange));
  border-radius: 4px;
  box-shadow: 0 0 8px var(--neon-pink);
}

.stat-fill.defense-fill {
  background: linear-gradient(90deg, var(--neon-green), var(--neon-cyan));
  box-shadow: 0 0 8px var(--neon-green);
}

.stat-fill.roll-fill {
  background: linear-gradient(90deg, #ff00ff, #ff66ff);
  box-shadow: 0 0 8px #ff00ff;
}

/* Mute button */
.mute-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.6);
  border: 2px solid var(--neon-cyan);
  border-radius: 50%;
  color: var(--text-white);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 100;
}

.mute-btn:hover {
  background: rgba(0,245,255,0.2);
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
  .game-title {
    font-size: 28px;
  }
  
  .controls-info {
    gap: 15px;
  }
  
  .control-item {
    flex-direction: column;
    gap: 5px;
  }
  
  .key {
    font-size: 10px;
    padding: 6px 10px;
  }
  
  .control-desc {
    font-size: 11px;
  }
  
  #game-canvas {
    width: 100%;
    height: auto;
  }
  
  .hud {
    flex-direction: column;
    gap: 15px;
  }
  
  .player-hud, .enemy-hud {
    width: 100%;
    text-align: center;
  }
  
  .health-bar {
    max-width: 200px;
    margin: 0 auto;
  }
  
  .enemy-hud .health-fill {
    float: none;
  }
  
  .game-controls-panel {
    flex-direction: column;
    gap: 15px;
  }
  
  .control-section {
    padding: 10px;
  }
  
  .key-btn {
    min-width: 28px;
    height: 28px;
    font-size: 10px;
  }
  
  .attacks {
    gap: 8px;
  }
  
  .attack-damage {
    font-size: 8px;
  }
}
