/* Retro Neon Arcade Styling for Word Fall PRO */

.screen {
  display: none;
  width: 100%;
}
.screen.active-screen {
  display: block;
}

.game-container {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  min-height: 600px;
}

.glass-panel-glow {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Menu Screen */
.menu-hero-header {
  margin-bottom: 2rem;
}
.hero-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.hero-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  font-weight: 900;
  font-size: 0.82rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hero-header-right {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.glow-badge {
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  color: #facc15;
  font-size: 0.9rem;
}
.glow-btn-sm {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.35rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.glow-btn-sm:hover {
  background: rgba(255, 255, 255, 0.18);
}
.logo-title-group {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.logo-mascot {
  font-size: 3rem;
  filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.6));
}
.hero-logo {
  font-size: 2.8rem;
  font-weight: 900;
  margin: 0;
  background: linear-gradient(135deg, #38bdf8, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.04em;
}
.logo-tag {
  font-size: 1.1rem;
  background: #ec4899;
  -webkit-text-fill-color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  vertical-align: middle;
}

/* Mode Cards */
.hero-mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}
.mode-card {
  background: rgba(30, 41, 59, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1.5rem 1.2rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}
.mode-card.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.2));
  border-color: #38bdf8;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
}
.mode-card-badge {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 0.6rem;
}
.mode-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
}
.mode-card-title {
  font-size: 1.25rem;
  margin: 0 0 0.4rem 0;
  color: #fff;
}
.mode-card-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

/* Sub options */
.arcade-sub-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2.2rem;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.4);
  border-radius: 16px;
}
.sub-option-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.sub-option-label {
  font-weight: 800;
  font-size: 0.88rem;
  color: #94a3b8;
  text-transform: uppercase;
}
.sub-option-buttons {
  display: flex;
  gap: 0.4rem;
}
.sub-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}
.sub-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
}

/* Launch Row */
.arcade-launch-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.arcade-primary-launch-btn {
  background: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6);
  color: #ffffff;
  border: none;
  padding: 1.15rem 3.5rem;
  border-radius: 20px;
  font-size: 1.35rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: inherit;
}
.arcade-primary-launch-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.6);
}
.arcade-quick-tools {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.arcade-tool-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.arcade-tool-btn:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
}

/* GAMEPLAY SCREEN */
.game-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.game-area {
  position: relative;
  width: 100%;
  height: 480px;
  background: linear-gradient(180deg, #090d16 0%, #0f172a 100%);
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.laser-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

.danger-line {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, #ef4444, #ef4444 15px, transparent 15px, transparent 30px);
  opacity: 0.7;
  z-index: 2;
}

.danger-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(180deg, transparent, rgba(239, 68, 68, 0.15));
  pointer-events: none;
}

.player-turret-game {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.4rem;
  z-index: 5;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.8));
}

/* Falling Word Element */
.falling-word {
  position: absolute;
  padding: 0.45rem 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  font-family: 'Outfit', monospace;
  font-weight: 800;
  font-size: 1.15rem;
  color: #f8fafc;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(56, 189, 248, 0.2);
  letter-spacing: 0.08em;
  user-select: none;
  transition: transform 0.05s linear;
  z-index: 4;
}

.falling-word.active-target {
  border-color: #facc15;
  box-shadow: 0 0 20px rgba(250, 204, 21, 0.6);
  transform: scale(1.08);
}

.falling-word .typed {
  color: #38bdf8;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

.falling-word.active-target .typed {
  color: #facc15;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.9);
}

.falling-word.exploding {
  animation: wordPop 0.3s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wordPop {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.8; filter: brightness(2); }
  100% { transform: scale(0.2); opacity: 0; }
}

/* Input interface */
.input-container {
  width: 100%;
}
#word-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.2);
  outline: none;
  transition: all 0.2s;
  letter-spacing: 0.08em;
}
#word-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.5);
}

/* Under input controls */
.under-input-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.streak-bar-wrapper {
  flex: 1;
  min-width: 240px;
}
.streak-details {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: #94a3b8;
}
.multiplier-badge {
  color: #fbbf24;
}
.streak-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
#streak-bar-inner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #f59e0b, #ef4444);
  transition: width 0.2s ease;
}

.skills-bar-container {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.skill-meter-track {
  width: 60px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.skill-meter-fill {
  height: 100%;
  width: 0%;
  background: #38bdf8;
  transition: width 0.2s ease;
}
.skill-btn {
  background: #1e293b;
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.skill-btn:hover:not(:disabled) {
  background: #0284c7;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}
.skill-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Stats dashboard */
.stats-dashboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0.8rem 1.2rem;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.stat-box {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 800;
}
.stat-value {
  font-size: 1.15rem;
  font-weight: 900;
  color: #f8fafc;
}
.header-controls {
  display: flex;
  gap: 0.5rem;
}
.mini-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

/* End / Pause / GameOver Screens */
.arcade-end-card, .arcade-pause-card {
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
}
.end-screen-title {
  font-size: 2.4rem;
  font-weight: 900;
  margin: 0.5rem 0;
  color: #ffffff;
}
.star-rating-container {
  font-size: 2rem;
  color: #facc15;
  margin: 0.5rem 0 1rem;
}
.celebration-text {
  color: #94a3b8;
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
}
.end-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.8rem;
  background: rgba(2, 6, 23, 0.5);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 2rem;
}
.end-stat-box {
  display: flex;
  flex-direction: column;
}
.end-stat-label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
}
.end-stat-val {
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
}
.gold-val { color: #facc15; }
.emerald-val { color: #34d399; }

.coins-earned-badge {
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 0.6rem 1.4rem;
  border-radius: 14px;
  font-weight: 900;
  font-size: 1.2rem;
  color: #facc15;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.8rem;
}
.gameover-actions, .pause-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
}
.clean-tool-btn {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.85rem 2.2rem;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  max-width: 320px;
  transition: all 0.2s;
}
.clean-tool-btn:hover {
  background: #334155;
}
