@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-primary: #06080d;
  --glass-bg: rgba(22, 28, 42, 0.65);
  --glass-bg-hover: rgba(30, 38, 56, 0.75);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-glow: rgba(0, 242, 254, 0.4);
  
  --accent-cyan: #00f2fe;
  --accent-violet: #7928ca;
  --accent-magenta: #ff0080;
  --accent-amber: #ffb703;
  --accent-green: #00f5d4;
  --accent-red: #ff3b30;

  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --radius-ios: 24px;
  --radius-pill: 9999px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  padding-bottom: 95px;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(121, 40, 202, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(0, 242, 254, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 0, 128, 0.1) 0%, transparent 60%);
  background-attachment: fixed;
}

/* Header iOS 26 Liquid Glass */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(6, 8, 13, 0.75);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-icon {
  background: rgba(18, 24, 40, 0.75);
  border: 1.5px solid rgba(0, 242, 254, 0.35);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: 22px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 14px rgba(0, 242, 254, 0.18);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-icon:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.45);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(121, 40, 202, 0.15));
}

.btn-icon:active {
  transform: scale(0.95);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(0, 242, 254, 0.6);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* iOS 26 Glass Card */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border: 1.5px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-ios);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(0, 242, 254, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover, .card:active, .card.card-illuminated {
  border-color: rgba(0, 242, 254, 0.65) !important;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 35px rgba(0, 242, 254, 0.4),
    inset 0 0 15px rgba(0, 242, 254, 0.12) !important;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mode Selection Grid iOS 26 */
.mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mode-card {
  background: rgba(18, 24, 40, 0.75);
  border: 1.5px solid rgba(0, 242, 254, 0.35);
  border-radius: 20px;
  padding: 16px;
  cursor: pointer;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 16px rgba(0, 242, 254, 0.18);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 14px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.mode-card:hover {
  border-color: rgba(0, 242, 254, 0.65);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45), 0 0 22px rgba(0, 242, 254, 0.3);
}

.mode-card:active {
  transform: scale(0.97);
}

.mode-card.selected {
  border-color: var(--accent-cyan) !important;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.18), rgba(121, 40, 202, 0.18)) !important;
  box-shadow: 0 0 35px rgba(0, 242, 254, 0.5), inset 0 0 15px rgba(0, 242, 254, 0.15) !important;
}

.mode-card.selected::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  border: 1.5px solid var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.6);
  pointer-events: none;
  animation: mode-glow-pulse 2s infinite alternate ease-in-out;
}

@keyframes mode-glow-pulse {
  0% { opacity: 0.7; box-shadow: 0 0 15px rgba(0, 242, 254, 0.4); }
  100% { opacity: 1; box-shadow: 0 0 30px rgba(0, 242, 254, 0.75); }
}

.mode-icon {
  font-size: 2.2rem;
  background: rgba(0, 242, 254, 0.08);
  border: 1.5px solid rgba(0, 242, 254, 0.25);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
  padding: 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mode-info h4 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.mode-info p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Settings Controls iOS 26 Segmented Bars */
.setting-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row > span {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
}

.chip-group {
  display: flex;
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 4px;
  gap: 4px;
  box-sizing: border-box;
  overflow: visible;
  position: relative;
}

.chip {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 2px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  position: relative;
  z-index: 1;
}

.chip:hover {
  color: var(--text-main);
}

.chip.active {
  background: linear-gradient(135deg, #00f2fe 0%, #7928ca 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 
    0 0 25px rgba(0, 242, 254, 0.7),
    0 4px 18px rgba(121, 40, 202, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.6) !important;
  z-index: 2;
}

.chip.active::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 18px;
  background: linear-gradient(135deg, #00f2fe, #7928ca);
  filter: blur(10px);
  opacity: 0.85;
  z-index: -1;
}

/* Liquid Glass HUD Timer */
.timer-glass-hud {
  background: linear-gradient(145deg, rgba(10, 15, 26, 0.85), rgba(18, 24, 40, 0.95));
  backdrop-filter: blur(25px);
  border: 2px solid rgba(0, 242, 254, 0.4);
  border-radius: 24px;
  padding: 22px 20px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 242, 254, 0.2);
  transition: border-color 0.6s ease, box-shadow 0.6s ease, background 0.6s ease;
}

.timer-glass-hud.state-cyan {
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 242, 254, 0.25);
}

.timer-glass-hud.state-yellow {
  border-color: rgba(255, 234, 0, 0.85);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 35px rgba(255, 234, 0, 0.45);
}

.timer-glass-hud.state-orange {
  border-color: rgba(255, 123, 0, 0.95);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 123, 0, 0.65);
}

.timer-glass-hud.intense-fire,
.timer-glass-hud.state-red {
  border-color: #ff0055 !important;
  box-shadow: 0 0 55px rgba(255, 0, 85, 0.85), 0 12px 40px rgba(0, 0, 0, 0.8) !important;
  animation: intense-fire-hud 0.3s infinite alternate ease-in-out;
}

.timer-digits {
  font-size: 4.2rem;
  font-weight: 900;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin: 8px 0 24px 0; /* Expanded spacing between timer digits and progress bar */
  filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.4));
  transition: all 0.4s ease;
}

.timer-digits.warning-yellow {
  background: linear-gradient(135deg, #ffffff 30%, #ffea00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(255, 234, 0, 0.7));
}

.timer-digits.warning-orange {
  background: linear-gradient(135deg, #ffffff 30%, #ff7b00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(255, 123, 0, 0.8));
}

.timer-digits.danger {
  background: linear-gradient(135deg, #ffffff 0%, #ff3300 50%, #ff0055 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 0 35px rgba(255, 51, 0, 1)) !important;
  animation: intense-fire-text 0.25s infinite alternate ease-in-out;
}

@keyframes pulse-glow {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.progress-track-bar {
  width: 100%;
  height: 14px;
  background: rgba(10, 5, 2, 0.7);
  border: 1.5px solid rgba(255, 100, 0, 0.4);
  border-radius: 12px;
  overflow: visible;
  position: relative;
  margin-top: 20px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

.progress-fill-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffe600 0%, #ff3300 50%, #ff0055 100%);
  box-shadow: 0 0 20px #ff3300, 0 0 10px #ffe600;
  transition: width 1s linear, background 0.6s ease;
  border-radius: 10px;
  position: relative;
}

.progress-fire-head {
  position: absolute;
  right: -12px;
  top: -10px;
  font-size: 1.45rem;
  line-height: 1;
  filter: drop-shadow(0 0 10px #ff4500);
  animation: flame-pulse-gentle 0.8s infinite alternate ease-in-out;
  pointer-events: none;
  z-index: 10;
  transition: font-size 0.4s ease, filter 0.4s ease;
}

@keyframes flame-pulse-gentle {
  0% { transform: scale(1) translateY(0) rotate(-3deg); filter: drop-shadow(0 0 8px #ff7b00); }
  100% { transform: scale(1.22) translateY(-2px) rotate(4deg); filter: drop-shadow(0 0 16px #ffea00); }
}

.timer-glass-hud.state-yellow .progress-fire-head {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 18px #ffea00) !important;
}

.timer-glass-hud.state-orange .progress-fire-head {
  font-size: 1.75rem;
  filter: drop-shadow(0 0 24px #ff7b00) !important;
}

.timer-glass-hud.state-red .progress-fire-head,
.timer-glass-hud.intense-fire .progress-fire-head {
  font-size: 2rem !important;
  filter: drop-shadow(0 0 30px #ff0055) !important;
  animation: fire-spark-bounce 0.25s infinite alternate ease-in-out !important;
}

@keyframes fire-spark-bounce {
  0% { transform: scale(1) translateY(0) rotate(-5deg); }
  100% { transform: scale(1.3) translateY(-2px) rotate(5deg); filter: drop-shadow(0 0 18px #ffe600); }
}

/* Intense Fire Danger Hazard Mode */
.timer-glass-hud.intense-fire {
  border-color: #ff3300 !important;
  box-shadow: 0 0 50px rgba(255, 51, 0, 0.65), 0 12px 40px rgba(0, 0, 0, 0.8) !important;
  animation: intense-fire-hud 0.3s infinite alternate ease-in-out;
}

.timer-digits.danger {
  background: linear-gradient(135deg, #ffffff 0%, #ff3300 50%, #ff0055 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 0 35px rgba(255, 51, 0, 1)) !important;
  animation: intense-fire-text 0.25s infinite alternate ease-in-out;
}

.timer-digits.danger ~ .progress-track-bar .progress-fill-bar {
  background: linear-gradient(90deg, #ffffff 0%, #ffea00 30%, #ff0033 100%) !important;
  box-shadow: 0 0 40px #ff0033, 0 0 25px #ffea00 !important;
  animation: intense-fire-bar 0.25s infinite alternate ease-in-out;
}

.timer-digits.danger ~ .progress-track-bar .progress-fire-head {
  font-size: 1.8rem;
  right: -16px;
  top: -14px;
  animation: intense-fire-spark 0.15s infinite alternate ease-in-out;
}

@keyframes intense-fire-spark {
  0% { transform: scale(1.2) rotate(-8deg); filter: drop-shadow(0 0 15px #ff0033); }
  100% { transform: scale(1.6) rotate(8deg); filter: drop-shadow(0 0 30px #ffffff); }
}

@keyframes intense-fire-hud {
  0% { border-color: rgba(255, 51, 0, 0.7); box-shadow: 0 0 35px rgba(255, 51, 0, 0.5); }
  100% { border-color: rgba(255, 230, 0, 1); box-shadow: 0 0 60px rgba(255, 230, 0, 0.8); }
}

@keyframes intense-fire-text {
  0% { transform: scale(1); filter: drop-shadow(0 0 25px rgba(255, 51, 0, 0.8)); }
  100% { transform: scale(1.08); filter: drop-shadow(0 0 45px rgba(255, 230, 0, 1)); }
}

@keyframes intense-fire-bar {
  0% { filter: brightness(1.1); }
  100% { filter: brightness(1.5); }
}

/* Premium Player Cards Grid */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.player-tile {
  background: linear-gradient(145deg, rgba(22, 28, 42, 0.85), rgba(12, 16, 25, 0.95));
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(0, 242, 254, 0.25);
  border-radius: 20px;
  padding: 16px 14px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 242, 254, 0.1);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.player-top-progress-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  z-index: 5;
}

.player-top-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 0 4px 4px 0;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.5s ease, box-shadow 0.5s ease;
}

.player-tile:hover, .player-tile:active, .player-tile.card-illuminated {
  transform: translateY(-2px);
  border-color: rgba(0, 242, 254, 0.6) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 242, 254, 0.35) !important;
}

.player-tile.winner {
  border-color: var(--accent-amber);
  background: linear-gradient(145deg, rgba(42, 32, 14, 0.95), rgba(20, 15, 6, 0.95));
  box-shadow: 0 0 35px rgba(255, 183, 3, 0.5);
}

.player-tile.winner::before {
  background: linear-gradient(90deg, #ffb703, #ff0080);
  opacity: 1;
}

.player-avatar-badge {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  background: rgba(18, 24, 40, 0.85);
  border: 1.5px solid rgba(0, 242, 254, 0.45);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-cyan);
  margin-right: 8px;
  flex-shrink: 0;
}

.player-name-input {
  background: rgba(18, 24, 40, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: var(--text-main);
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 8px;
  width: 100%;
  outline: none;
  transition: all 0.25s ease;
}

.player-name-input:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.15);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.35);
}

.player-score-container {
  margin: 10px 0;
}

.player-score {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.3));
}

.score-controls-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-score-fancy {
  flex: 1;
  height: 44px;
  border-radius: 16px;
  border: none;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-score-fancy.plus {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(121, 40, 202, 0.25));
  border: 1.5px solid rgba(0, 242, 254, 0.5);
  color: var(--accent-cyan);
  box-shadow: 0 4px 16px rgba(0, 242, 254, 0.3);
}

.btn-score-fancy.plus:active {
  transform: scale(0.93) !important;
  background: rgba(0, 242, 254, 0.4);
}

.btn-score-fancy.minus {
  background: rgba(255, 59, 48, 0.15);
  border: 1.5px solid rgba(255, 59, 48, 0.4);
  color: #ff4d6d;
}

.btn-score-fancy.minus:active {
  transform: scale(0.93) !important;
  background: rgba(255, 59, 48, 0.3);
}

.penalty-strip {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.penalty-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
}

.penalty-buttons {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.btn-penalty-chip {
  flex: 1;
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 77, 109, 0.35);
  color: #ff85a1;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-penalty-chip:active {
  background: rgba(255, 77, 109, 0.35);
  border-color: var(--accent-red);
  color: #ffffff;
  transform: scale(0.95);
}

/* Action Primary Buttons iOS 26 */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  border: none;
  color: white;
  padding: 16px;
  border-radius: var(--radius-ios);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.45);
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

/* Game Arena Displays */
.arena-card {
  text-align: center;
  padding: 30px 20px;
}

.letter-square-frame {
  width: 120px;
  height: 120px;
  margin: 16px auto;
  background: rgba(18, 24, 40, 0.75);
  border: 1.5px solid rgba(0, 242, 254, 0.45);
  border-radius: 26px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(0, 242, 254, 0.3),
    inset 0 0 15px rgba(0, 242, 254, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.letter-square-frame:hover {
  border-color: var(--accent-cyan);
  box-shadow: 
    0 14px 38px rgba(0, 0, 0, 0.6),
    0 0 35px rgba(0, 242, 254, 0.5),
    inset 0 0 20px rgba(0, 242, 254, 0.15);
  transform: translateY(-2px);
}

.big-letter {
  font-size: 4.8rem;
  font-weight: 900;
  color: #ffffff;
  -webkit-text-stroke: 2px #00f2fe;
  text-shadow: 
    0 0 15px rgba(0, 242, 254, 0.9),
    0 0 30px rgba(0, 242, 254, 0.6),
    0 0 45px rgba(121, 40, 202, 0.5);
  line-height: 1;
  margin: 0;
  user-select: none;
  background: linear-gradient(135deg, #ffffff 30%, #00f2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topic-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-amber);
  margin: 12px 0;
  letter-spacing: -0.3px;
}

.badge-difficulty {
  display: inline-block;
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid var(--accent-amber);
  color: var(--accent-amber);
  padding: 5px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Form Controls iOS 26 */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 14px 16px;
  border-radius: 16px;
  outline: none;
  font-size: 0.95rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.form-control:focus {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.25);
}

/* Ultra-Premium Floating Bottom Navigation */
.nav-tabs {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  max-width: 580px;
  margin: 0 auto;
  background: rgba(14, 18, 30, 0.88);
  backdrop-filter: blur(30px) saturate(210%);
  -webkit-backdrop-filter: blur(30px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 5px 6px;
  z-index: 1000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 242, 254, 0.15);
}

.nav-tab {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 2px;
  border-radius: 22px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.nav-tab span {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-tab span:first-child {
  font-size: 1.25rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.18), rgba(121, 40, 202, 0.18));
  border: 1px solid rgba(0, 242, 254, 0.35);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}

.nav-tab.active span:first-child {
  transform: scale(1.15);
}

.hidden {
  display: none !important;
}

/* iOS Spring Micro-Interactions & Balance */
.card, .mode-card, .player-tile, .btn-primary, .btn-icon, .chip {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-primary:active, .btn-icon:active, .chip:active, .mode-card:active {
  transform: scale(0.94) !important;
}

/* Subtle Admin Link Button */
.btn-subtle-admin {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(0, 242, 254, 0.35);
  color: var(--accent-cyan);
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: 12px;
}

.btn-subtle-admin:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
}

/* Modal Overlay & Glass Card */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(4, 7, 14, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: ios-fade-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card {
  background: linear-gradient(145deg, rgba(20, 26, 42, 0.95), rgba(10, 14, 23, 0.98));
  border: 1.5px solid rgba(0, 242, 254, 0.45);
  border-radius: 28px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 242, 254, 0.3);
  animation: ios-slide-up 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 77, 109, 0.3);
  color: #ff4d6d;
}

/* Winner Victory Glass Modal */
.winner-card {
  text-align: center;
  background: linear-gradient(145deg, rgba(30, 22, 50, 0.96), rgba(12, 10, 24, 0.98));
  border: 2px solid var(--accent-amber);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.9), 0 0 50px rgba(255, 183, 3, 0.45);
  animation: winner-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.winner-crown-icon {
  font-size: 4.5rem;
  margin-bottom: 6px;
  animation: crown-float 1.5s infinite alternate ease-in-out;
  filter: drop-shadow(0 0 25px rgba(255, 183, 3, 0.8));
}

.winner-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-amber);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.winner-name {
  font-size: 2.2rem;
  font-weight: 900;
  margin: 8px 0 2px 0;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(0, 242, 254, 0.4));
}

.winner-score {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent-green);
}

@keyframes crown-float {
  0% { transform: translateY(0) rotate(-3deg); }
  100% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes winner-pop-in {
  0% { transform: scale(0.7) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Bidding Player Select Segmented Bar */
.bidding-player-select {
  display: flex;
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid var(--glass-border);
  border-radius: 20px;
  padding: 4px;
  gap: 4px;
  margin-top: 10px;
}

.bidding-player-select .chip {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  padding: 10px 4px;
  text-align: center;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Apple iOS 26 Pro Motion & Ultra-Smooth Micro-Interactions */
.btn-primary, .btn-icon, .chip, .nav-tab, .mode-card, .btn-score-fancy, .player-tile {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, color 0.35s ease !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:active, .btn-icon:active, .chip:active, .mode-card:active, .nav-tab:active, .btn-score-fancy:active {
  transform: scale(0.93) !important;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Fiery 3-Second Pre-Start Countdown Overlay with Full Inferno Background */
.fire-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 50% 50%, rgba(255, 100, 0, 0.65) 0%, rgba(200, 20, 0, 0.5) 45%, rgba(8, 2, 5, 0.98) 85%);
  backdrop-filter: blur(40px) saturate(280%);
  -webkit-backdrop-filter: blur(40px) saturate(280%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: ios-fade-in 0.2s ease-out;
  overflow: hidden;
}

.fire-overlay::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: 
    radial-gradient(ellipse at 50% 90%, rgba(255, 230, 0, 0.55) 0%, transparent 60%),
    radial-gradient(ellipse at 25% 30%, rgba(255, 50, 0, 0.45) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 40%, rgba(255, 0, 80, 0.4) 0%, transparent 50%);
  animation: inferno-bg-pulse 1s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes inferno-bg-pulse {
  0% { transform: scale(1) rotate(0deg); opacity: 0.75; }
  100% { transform: scale(1.15) rotate(3deg); opacity: 1; filter: saturate(300%); }
}

.fire-ember-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.fire-ember {
  position: absolute;
  bottom: -25px;
  background: radial-gradient(circle, #ffffff, #ffea00, #ff3300);
  border-radius: 50%;
  box-shadow: 0 0 14px #ffea00, 0 0 28px #ff3300;
  animation: floatEmber 2.2s infinite ease-in;
  opacity: 0.9;
}

@keyframes floatEmber {
  0% { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 1; }
  50% { opacity: 0.9; }
  100% { transform: translateY(-110vh) scale(1.6) rotate(360deg); opacity: 0; }
}

.fire-countdown-card {
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}

.fire-flame-icon {
  font-size: 5.5rem;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 45px #ff4500);
  margin-bottom: 20px;
  display: block;
  transform-origin: center bottom;
}

.fire-flame-icon.stage-3 {
  transform: scale(1.1);
  filter: drop-shadow(0 0 35px #ffb703) drop-shadow(0 0 55px #ff5500);
}

.fire-flame-icon.stage-2 {
  transform: scale(1.5);
  filter: drop-shadow(0 0 70px #ff5500) drop-shadow(0 0 110px #ff0000);
  animation: flame-burst-2 0.25s infinite alternate ease-in-out;
}

.fire-flame-icon.stage-1 {
  transform: scale(1.9);
  filter: drop-shadow(0 0 110px #ff0033) drop-shadow(0 0 160px #ffe600);
  animation: flame-inferno-1 0.18s infinite alternate ease-in-out;
}

.fire-flame-icon.stage-go {
  transform: scale(2.4);
  filter: drop-shadow(0 0 150px #ffe600) drop-shadow(0 0 220px #ff0055);
  animation: flame-eruption 0.12s infinite alternate ease-in-out;
}

.fire-number {
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  margin: 10px 0 16px 0;
  letter-spacing: -4px;
  background: linear-gradient(135deg, #ffea00 0%, #ff5500 50%, #ff0055 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 40px rgba(255, 69, 0, 0.95));
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
}

.fire-number.stage-3 {
  transform: scale(0.95);
  background: linear-gradient(135deg, #ffea00 0%, #ff8800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 25px rgba(255, 183, 3, 0.7));
}

.fire-number.stage-2 {
  transform: scale(1.25);
  background: linear-gradient(135deg, #ffea00 0%, #ff3300 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 50px rgba(255, 85, 0, 0.95));
}

.fire-number.stage-1 {
  transform: scale(1.5);
  background: linear-gradient(135deg, #ffffff 0%, #ff2d55 50%, #ff0033 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 75px rgba(255, 0, 85, 1));
}

.fire-number.stage-go {
  transform: scale(1.6);
  font-size: 4.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #ffea00 40%, #ff3300 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 85px rgba(255, 230, 0, 1));
}

.fire-subtext {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent-amber);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255, 183, 3, 0.8);
}

/* Pause State HUD Animations */
.timer-glass-hud.paused {
  border-color: var(--accent-amber) !important;
  box-shadow: 0 0 40px rgba(255, 183, 3, 0.45), 0 12px 35px rgba(0, 0, 0, 0.7) !important;
  animation: pause-glass-pulse 1.2s infinite alternate ease-in-out;
}

.timer-glass-hud.paused .timer-digits {
  background: linear-gradient(135deg, #ffffff 20%, var(--accent-amber) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 0 25px rgba(255, 183, 3, 0.9)) !important;
  animation: pause-digits-blink 1s infinite alternate;
}

.pause-badge-overlay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 183, 3, 0.18);
  border: 1px solid var(--accent-amber);
  color: var(--accent-amber);
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 10px;
  box-shadow: 0 0 15px rgba(255, 183, 3, 0.35);
  animation: pause-badge-bounce 1s infinite alternate ease-in-out;
}

@keyframes pause-glass-pulse {
  0% { border-color: rgba(255, 183, 3, 0.4); }
  100% { border-color: rgba(255, 183, 3, 0.9); }
}

@keyframes pause-digits-blink {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.65; transform: scale(0.97); }
}

@keyframes pause-badge-bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

@keyframes flame-burst-2 {
  0% { transform: scale(1.25) rotate(-3deg); }
  100% { transform: scale(1.38) rotate(3deg); }
}

@keyframes flame-inferno-1 {
  0% { transform: scale(1.6) rotate(-5deg); filter: drop-shadow(0 0 60px #ff0033); }
  100% { transform: scale(1.82) rotate(5deg); filter: drop-shadow(0 0 85px #ff4500); }
}

@keyframes flame-eruption {
  0% { transform: scale(2.0); filter: drop-shadow(0 0 80px #ffe600); }
  100% { transform: scale(2.2); filter: drop-shadow(0 0 100px #ffffff); }
}

@keyframes flame-pulse {
  0% { transform: scale(1) rotate(-4deg); }
  100% { transform: scale(1.25) rotate(4deg); }
}

@keyframes super-fire-pulse {
  0% { transform: scale(1.3); }
  100% { transform: scale(1.42); }
}

@keyframes ios-slide-up {
  0% { transform: translateY(30px) scale(0.95); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes ios-fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
