:root {
  --bg-color: #060b14;
  --card-bg: rgba(11, 22, 42, 0.76);
  --border-color: rgba(147, 197, 253, 0.24);
  --primary-color: #0ea5e9;
  --primary-hover: #38bdf8;
  --ice-cyan: #38bdf8;
  --ice-blue: #0284c7;
  --frost-glow: rgba(56, 189, 248, 0.3);
  --text-main: #f0f9ff;
  --text-muted: #94a3b8;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --border-radius: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* Background Layers */
.winter-bg-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  background-image: url('assets/winter_mascot_bg.jpg');
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(0.62) saturate(1.15);
  pointer-events: none;
}

.winter-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, rgba(7, 16, 32, 0.35) 0%, rgba(6, 11, 20, 0.88) 70%, rgba(4, 8, 15, 0.98) 100%);
}

.snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  position: relative;
  z-index: 10;
  padding-bottom: 90px !important;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(11, 22, 42, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #f0f9ff;
}

.user-icon {
  font-size: 16px;
}

.header-mascot-avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.badge {
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

/* Frosted Glass Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 16px rgba(56, 189, 248, 0.06);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(186, 230, 253, 0.5), transparent);
  pointer-events: none;
}

.hero-card {
  text-align: center;
  padding: 30px 18px;
}

.hero-icon {
  font-size: 52px;
  margin-bottom: 12px;
}

.event-icon {
  font-size: 46px;
  margin-bottom: 10px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 8px;
  line-height: 1.5;
}

/* Winter Mascot Hero Banner */
.mascot-banner-card {
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.15);
}

.mascot-banner-wrapper {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
}

.mascot-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform 0.4s ease;
}

.mascot-banner-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(11, 22, 42, 0.95) 0%, rgba(11, 22, 42, 0.4) 50%, rgba(11, 22, 42, 0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
}

.mascot-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 165, 233, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #bae6fd;
  width: fit-content;
  margin-bottom: 4px;
}

.mascot-banner-title {
  font-size: 19px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* =========================================================
   WINTER BUTTONS & FROST SHINE
   ========================================================= */

.btn {
  padding: 11px 18px;
  border-radius: 14px;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

/* Shimmer gleam across buttons */
.btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -80%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(25deg);
  pointer-events: none;
  animation: frostShimmer 4s infinite;
}

@keyframes frostShimmer {
  0%, 75% { left: -80%; }
  100% { left: 160%; }
}

.btn:active {
  transform: scale(0.97);
}

/* Primary: Royal Glacier Ice Blue */
.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%);
  color: #ffffff;
  border: 1px solid rgba(224, 242, 254, 0.5);
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Danger: Frostfire Crimson */
.btn-danger {
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 50%, #f87171 100%);
  color: #ffffff;
  border: 1px solid rgba(254, 202, 202, 0.45);
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* Warning: Golden Aurora Amber */
.btn-warning {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
  color: #070e1b;
  font-weight: 800;
  border: 1px solid rgba(254, 243, 199, 0.6);
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-block {
  width: 100%;
  margin-top: 10px;
  padding: 13px 18px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 10px;
}

/* Pulse animation for Join button */
.pulse-btn {
  animation: pulse-glow 2s infinite ease-in-out;
}
@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

/* Inputs & Forms */
.input-group {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

input, select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(7, 16, 32, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus {
  border-color: var(--ice-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.status-msg {
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
}

.hidden { display: none !important; }

/* Lobby Boxes */
.lobby-countdown-box {
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
  border-radius: 14px;
  padding: 12px;
  margin: 12px 0;
  text-align: center;
}

.timer-title {
  font-size: 12px;
  color: #bae6fd;
  display: block;
  font-weight: 700;
}

.timer-digits {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
}

.prize-info-box {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 14px;
  padding: 12px;
  margin: 8px 0;
  text-align: left;
}

.prize-label {
  font-size: 12px;
  font-weight: 800;
  color: #fbbf24;
}

.prize-content {
  font-size: 13.5px;
  color: #fef3c7;
  white-space: pre-line;
  margin-top: 4px;
  line-height: 1.4;
}

.players-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(7, 16, 32, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 13px;
}

/* =========================================================
   EVENT 1: 🐲 БИТВА С ДРАКОНОМ ХАОСА (FROST WYRM)
   ========================================================= */

#game-module-boss {
  background: radial-gradient(circle at 50% 20%, rgba(14, 165, 233, 0.18) 0%, rgba(11, 22, 42, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
}

.hp-bar-container {
  height: 26px;
  background: rgba(4, 10, 20, 0.8);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  margin: 14px 0 20px 0;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 10px rgba(56, 189, 248, 0.2);
}

.hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%);
  width: 100%;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

.hp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.5px;
}

.boss-click-zone {
  text-align: center;
  padding: 26px 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 72%);
  border-radius: 24px;
  transition: transform 0.08s ease;
  position: relative;
}

.boss-click-zone:active {
  transform: scale(0.95);
}

.boss-avatar {
  font-size: 88px;
  display: inline-block;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.5));
  animation: frostBreathe 3s infinite ease-in-out;
  transition: transform 0.05s ease;
}

@keyframes frostBreathe {
  0%, 100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.4)); }
  50% { transform: scale(1.05) translateY(-4px); filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.7)); }
}

.boss-avatar.shake-hit {
  animation: bossShake 0.15s ease-out;
}

@keyframes bossShake {
  0% { transform: translate(0, 0) scale(0.95); }
  25% { transform: translate(-5px, 3px) scale(0.95); }
  50% { transform: translate(5px, -3px) scale(0.95); }
  75% { transform: translate(-3px, -2px) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}

.tap-hint {
  font-size: 12px;
  color: #38bdf8;
  font-weight: 800;
  letter-spacing: 1px;
  margin-top: 10px;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.floating-dmg {
  position: absolute;
  font-weight: 900;
  color: #38bdf8;
  font-size: 22px;
  pointer-events: none;
  animation: floatUpWinter 0.85s forwards ease-out;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 100;
}

.floating-dmg.crit {
  color: #fbbf24;
  font-size: 28px;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.9), 0 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes floatUpWinter {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-60px) scale(1.35); }
}

/* =========================================================
   EVENT 2: ⚡ СПРИНТ РЕАКЦИИ (CRYOFROST SPRINT)
   ========================================================= */

.reaction-box {
  border-radius: 20px;
  padding: 40px 16px;
  text-align: center;
  user-select: none;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
}

.reaction-waiting {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, rgba(7, 16, 32, 0.9) 100%);
  border: 2px dashed rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.15);
}

.reaction-go {
  background: radial-gradient(circle, rgba(56, 189, 248, 0.6) 0%, rgba(2, 132, 199, 0.95) 100%);
  border: 2px solid #38bdf8;
  box-shadow: 0 0 45px rgba(56, 189, 248, 0.85), inset 0 0 20px rgba(255, 255, 255, 0.5);
  animation: pulse-go 0.6s infinite alternate ease-in-out;
}

@keyframes pulse-go {
  from { transform: scale(1); }
  to { transform: scale(1.025); }
}

.reaction-false-start {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.6) 0%, rgba(127, 29, 29, 0.9) 100%);
  border: 2px solid #ef4444;
}

.reaction-done {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(7, 16, 32, 0.9) 100%);
  border: 2px solid #10b981;
}

/* =========================================================
   EVENT 3: 🧠 ВИКТОРИНА (GLACIAL TRIVIA)
   ========================================================= */

.quiz-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 14px;
}

.timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  width: 100%;
  transition: width 1s linear;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.option-btn {
  padding: 13px 10px;
  min-height: 52px;
  background: rgba(11, 22, 42, 0.85);
  border: 1.5px solid rgba(147, 197, 253, 0.3);
  border-radius: 14px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: all 0.15s ease-in-out;
  position: relative;
  overflow: hidden;
}

.option-btn .opt-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.option-btn:hover {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.option-btn:active {
  background: rgba(14, 165, 233, 0.5);
  border-color: #38bdf8;
  transform: scale(0.96);
}

/* =========================================================
   EVENT 4: 🖼️ ФОТО-УГАДАЙКА / ДЕБЛЮР (FROST WINDOW)
   ========================================================= */

.blur-container {
  position: relative;
  width: 100%;
  height: 155px;
  border-radius: 14px;
  overflow: hidden;
  margin: 10px 0;
  background: #060b14;
  border: 1.5px solid rgba(147, 197, 253, 0.35);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(56, 189, 248, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blur-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #040810;
  filter: blur(25px);
  transition: filter 0.3s ease-out;
}

.freeze-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7, 24, 56, 0.88);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.freeze-box {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: #e0f2fe;
  font-weight: 900;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid #7dd3fc;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6);
  animation: pulse 1s infinite;
}

/* =========================================================
   BOTTOM NAVIGATION (FROSTED DOCK)
   ========================================================= */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: rgba(7, 16, 32, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(147, 197, 253, 0.25);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 1000;
  max-width: 480px;
  margin: 0 auto;
}

.nav-item {
  background: none;
  border: none;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item.active {
  color: #38bdf8;
  transform: translateY(-2px);
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  width: 16px;
  height: 3px;
  background: #38bdf8;
  border-radius: 3px;
  box-shadow: 0 0 8px #38bdf8;
}

.nav-icon {
  font-size: 20px;
}

/* Status & Indicators */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
}
.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.status-dot.offline {
  background: #ef4444;
}

.my-score-badge {
  background: rgba(14, 165, 233, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 6px 12px;
  border-radius: 10px;
  color: #bae6fd;
  font-size: 13.5px;
  font-weight: 700;
}

.toast-popup {
  position: fixed;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 22, 42, 0.95);
  color: white;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.2);
  z-index: 2000;
  transition: all 0.25s ease;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.stat-card {
  background: rgba(7, 16, 32, 0.6);
  border: 1px solid rgba(147, 197, 253, 0.15);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-icon { font-size: 20px; }
.stat-card b { font-size: 20px; color: #fff; }
.stat-label { font-size: 11px; color: var(--text-muted); }

/* Profile Card */
.profile-header-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.profile-avatar {
  font-size: 30px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(14, 165, 233, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

.profile-info h2 { font-size: 18px; margin: 0; }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.history-item {
  background: rgba(7, 16, 32, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.history-win {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

/* Settings Form */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 10px;
}

.setting-row.flex-col {
  flex-direction: column;
  align-items: flex-start;
}

.styled-input, .styled-textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(7, 16, 32, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: white;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.styled-input:focus, .styled-textarea:focus {
  border-color: var(--ice-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider { background-color: #10b981; }
input:checked + .slider:before { transform: translateX(20px); }

/* Global Events */
.global-events-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ge-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ge-scenario-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  color: #cbd5e1;
  white-space: pre-wrap;
  max-height: 120px;
  overflow-y: auto;
}

/* Boss Defeated Overlay */
.boss-defeated-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 11, 20, 0.94);
  backdrop-filter: blur(8px);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  animation: fadeIn 0.25s ease;
}

.boss-defeated-card {
  background: rgba(11, 22, 42, 0.95);
  border: 2px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.4);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  max-width: 320px;
  width: 90%;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}
