@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #141824;
  --bg-tertiary: #1e2330;
  --neon-cyan: #00f0ff;
  --neon-pink: #ff006e;
  --neon-purple: #8b5cf6;
  --neon-green: #00ff88;
  --neon-yellow: #ffeb3b;
  --text-primary: #fff;
  --text-secondary: #a0aec0;
  --text-muted: #64748b;
  --border: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(139, 92, 246, 0.3);
  --success: #00ff88;
  --danger: #ff006e;
  --warning: #ffeb3b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.5);
  --glow-pink: 0 0 20px rgba(255, 0, 110, 0.5);
  --glow-purple: 0 0 20px rgba(139, 92, 246, 0.5);
}
body {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image: radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 0, 110, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 20px;
}
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  position: relative;
  flex-wrap: wrap;
  gap: 24px;
}
.game-header h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.game-header h1 .emoji {
  font-size: 48px;
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
}
.game-header h1 .title-text {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 50%, var(--neon-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-pills {
  display: flex;
  gap: 8px;
  background: rgba(30, 35, 48, 0.6);
  padding: 8px;
  border-radius: 50px;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.nav-pill {
  padding: 12px 24px;
  background: 0 0;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  border-radius: 50px;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: "Space Grotesk", sans-serif;
  text-decoration: none;
  display: inline-block;
}
.nav-pill:hover {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.15);
}
.nav-pill.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}
.hud {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.hud-item {
  background: var(--bg-secondary);
  padding: 20px 32px;
  border-radius: 16px;
  border: 1px solid var(--border);
  text-align: center;
  min-width: 140px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all .3s ease;
}
.hud-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  opacity: 0.6;
}
.hud-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--glow-purple);
  border-color: var(--border-glow);
}
.hud-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}
.hud-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.game-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 24px 0;
}
.board-container {
  width: 100%;
  max-width: min(92vmin, 820px);
  display: flex;
  justify-content: center;
}
.zoom-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
  z-index: 10;
  padding: 8px;
}
.zoom-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  flex-shrink: 0;
}
.zoom-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--neon-purple);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}
.zoom-btn:active {
  transform: translateY(0);
}
.zoom-label {
  min-width: 70px;
  text-align: center;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  color: var(--text-primary);
}
.board-wrap {
  position: relative;
  width: 100%;
  max-width: min(60vmin, 500px);
  max-height: min(40vh, 500px);
  margin: 0 auto;
}
.board-scale {
  transform-origin: center center;
  transition: transform .3s ease;
}
.board-aspect {
  width: 100%;
  aspect-ratio: 1 / 1;
}
.board-aspect > .grid {
  height: 100%;
}
.grid {
  display: grid;
  gap: 12px;
  user-select: none;
  width: 100%;
  height: 100%;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.cell {
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: var(--bg-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(20px, 3vw, 40px);
  line-height: 1;
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: pointer;
  box-shadow: var(--shadow-md), inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity .2s ease;
}
.cell:hover::before {
  opacity: 1;
}
.cell:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.4);
  border-color: rgba(139, 92, 246, 0.6);
}
.cell.active {
  transform: scale(1.1) translateY(-4px);
  filter: brightness(1.4) saturate(1.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 60px var(--neon-green), inset 0 0 20px rgba(255, 255, 255, 0.2);
  border-color: var(--neon-green);
  animation: pulse-glow .6s ease infinite;
}
@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 60px var(--neon-green);
  }
  50% {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 80px var(--neon-green);
  }
  100% {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 60px var(--neon-green);
  }
}
.cell.shake {
  animation: shake .3s ease;
}
@keyframes shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(4px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-6px);
  }
  40%,
  60% {
    transform: translateX(6px);
  }
}
.level-progress {
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  width: 100%;
  max-width: min(92vmin, 820px);
  position: relative;
  z-index: 1;
}
.level-progress-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.level-progress-bar {
  flex: 1;
  height: 16px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan), var(--neon-green));
  width: 0%;
  transition: width .4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  position: relative;
}
.level-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
.level-progress-text {
  min-width: 50px;
  text-align: right;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  color: var(--neon-cyan);
}
.btn-gradient {
  padding: 20px 60px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-family: "Space Grotesk", sans-serif;
  position: relative;
  overflow: hidden;
  max-width: 400px;
  width: 100%;
}
.btn-gradient::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left .5s ease;
}
.btn-gradient:hover::before {
  left: 100%;
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.6), var(--glow-purple);
}
.btn-gradient:active {
  transform: translateY(0);
}
.highscore-table {
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 32px;
  box-shadow: var(--shadow-lg);
}
.highscore-table h3 {
  padding: 24px 32px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(0, 240, 255, 0.1));
  border-bottom: 1px solid var(--border-glow);
  font-size: 24px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  margin: 0;
}
.highscore-table table {
  width: 100%;
  border-collapse: collapse;
}
.highscore-table thead {
  background: var(--bg-tertiary);
}
.highscore-table th {
  padding: 18px 24px;
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .1em;
  font-family: "JetBrains Mono", monospace;
}
.highscore-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  font-family: "Space Grotesk", sans-serif;
}
.highscore-table tbody tr {
  transition: all .2s ease;
}
.highscore-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.08);
}
.highscore-table tbody tr:last-child td {
  border-bottom: none;
}
.tab-content {
  display: none;
  animation: fadeIn .4s ease-in-out;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 26, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(12px);
  animation: fadeIn .3s ease-in-out;
}
.overlay.hidden {
  display: none;
}
.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 26, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(12px);
  animation: fadeIn .3s ease-in-out;
  border-radius: 24px;
}
.game-overlay.hidden {
  display: none;
}
.overlay-content {
  background: var(--bg-secondary);
  padding: 48px;
  border-radius: 24px;
  border: 1px solid var(--border-glow);
  max-width: 540px;
  width: 90%;
  box-shadow: var(--shadow-lg), var(--glow-purple);
  position: relative;
  overflow: hidden;
}
.overlay-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
}
.overlay-content h2 {
  font-size: 36px;
  margin-bottom: 32px;
  text-align: center;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}
.form-group {
  margin-bottom: 24px;
}
.form-group label {
  display: block;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.form-group input {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: "Space Grotesk", sans-serif;
  transition: all .3s ease;
}
.form-group input:focus {
  outline: 0;
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), var(--glow-purple);
}
.form-group small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}
.btn {
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-family: "Space Grotesk", sans-serif;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left .5s ease;
}
.btn:hover::before {
  left: 100%;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.6), var(--glow-purple);
}
.btn:active {
  transform: translateY(0);
}
.btn-secondary {
  padding: 16px 40px;
  background: 0 0;
  color: var(--text-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-family: "Space Grotesk", sans-serif;
}
.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: var(--neon-purple);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}
.btn-secondary:active {
  transform: translateY(0);
}
.help-content {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 48px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.help-content h2 {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 32px;
  font-weight: 700;
}
.help-content h2:first-child {
  margin-top: 0;
}
.help-content h3 {
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 600;
}
.help-content p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 16px;
}
.help-content ul {
  list-style: none;
  padding-left: 0;
}
.help-content li {
  padding: 12px 0 12px 32px;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.7;
}
.help-content li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--neon-purple);
  font-size: 18px;
  font-weight: 700;
}
#startBtnContainer.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 26, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(16px);
}
.fullscreen-overlay.hidden {
  display: none;
}
.countdown {
  font-size: 120px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: countdown-pulse 1s ease-in-out;
}
@keyframes countdown-pulse {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.final-score {
  text-align: center;
  padding: 24px 0;
}
.final-score .score-label {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.final-score .score-value {
  font-size: 64px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 12px 0;
}
.final-score .level-label {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 12px;
}
.hidden {
  display: none !important;
}
@media (max-width: 1920px) and (min-width: 1441px) {
  .board-wrap {
    max-width: min(55vmin, 480px);
    max-height: min(38vh, 480px);
  }
}
@media (max-width: 1440px) and (min-width: 1025px) {
  .board-wrap {
    max-width: min(58vmin, 450px);
    max-height: min(40vh, 450px);
  }
}
/* Fixed incomplete media query and added missing mobile styles */
@media (max-width: 1024px) and (min-width: 769px) {
  .board-wrap {
    max-width: min(70vmin, 450px);
    max-height: min(50vh, 450px);
  }
  .cell {
    font-size: clamp(18px, 4vw, 32px);
  }
  .grid {
    gap: 10px;
    padding: 20px;
  }
}

/* Tablet optimization for better game experience */
@media (max-width: 768px) {
  .container {
    padding: 20px 16px;
  }
  .game-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 32px;
  }
  .game-header h1 {
    font-size: 36px;
  }
  .game-header h1 .emoji {
    font-size: 36px;
  }
  .nav-pills {
    width: 100%;
    justify-content: center;
  }
  .nav-pill {
    padding: 10px 18px;
    font-size: 14px;
  }
  .hud {
    gap: 12px;
  }
  .hud-item {
    padding: 16px 24px;
    min-width: 120px;
  }
  .hud-value {
    font-size: 28px;
  }
  .board-wrap {
    max-width: min(85vmin, 400px);
    max-height: min(55vh, 400px);
  }
  .grid {
    gap: 8px;
    padding: 16px;
  }
  .cell {
    font-size: clamp(16px, 4.5vw, 28px);
    border-radius: 12px;
  }
  .zoom-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 20px;
  }
  .zoom-label {
    font-size: 14px;
    min-width: 60px;
  }
  .overlay-content {
    padding: 32px 24px;
    width: 95%;
  }
  .overlay-content h2 {
    font-size: 28px;
    margin-bottom: 24px;
  }
  .help-content {
    padding: 32px 24px;
  }
  .help-content h2 {
    font-size: 26px;
  }
  .help-content h3 {
    font-size: 20px;
  }
  .countdown {
    font-size: 80px;
  }
  .final-score .score-value {
    font-size: 48px;
  }
}

/* Completely redesigned mobile styles for maximum playability */
@media (max-width: 480px) {
  .container {
    padding: 8px 8px;
  }
  .game-header {
    margin-bottom: 12px;
  }
  .game-header h1 {
    font-size: 22px;
  }
  .game-header h1 .emoji {
    font-size: 22px;
  }
  .nav-pills {
    flex-wrap: wrap;
    padding: 4px;
    gap: 4px;
  }
  .nav-pill {
    padding: 6px 12px;
    font-size: 11px;
  }
  .hud {
    gap: 4px;
    margin-bottom: 10px;
  }
  .hud-item {
    padding: 4px 8px;
    min-width: 60px;
    border-radius: 8px;
  }
  .hud-label {
    font-size: 8px;
    margin-bottom: 2px;
  }
  .hud-value {
    font-size: 14px;
  }
  .board-wrap {
    max-width: min(95vmin, 450px);
    max-height: min(75vh, 500px);
  }
  .grid {
    gap: 4px;
    padding: 8px;
    border-radius: 12px;
  }
  .cell {
    font-size: clamp(20px, 6.5vw, 36px);
    border-radius: 6px;
    border-width: 1.5px;
  }
  .zoom-controls {
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px;
  }
  .zoom-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 14px;
    border-radius: 6px;
  }
  .zoom-label {
    font-size: 10px;
    min-width: 35px;
  }
  .level-progress {
    gap: 6px;
    padding: 0 8px;
    margin-top: 10px;
  }
  .level-progress-label {
    font-size: 9px;
  }
  .level-progress-bar {
    height: 6px;
  }
  .level-progress-text {
    font-size: 10px;
    min-width: 25px;
  }
  .btn-gradient {
    padding: 10px 24px;
    font-size: 13px;
    border-radius: 30px;
  }
  .overlay-content {
    padding: 20px 16px;
  }
  .overlay-content h2 {
    font-size: 20px;
    margin-bottom: 16px;
  }
  .form-group input {
    padding: 10px 12px;
    font-size: 14px;
  }
  .btn {
    padding: 10px 24px;
    font-size: 13px;
  }
  .btn-secondary {
    padding: 10px 24px;
    font-size: 13px;
  }
  .help-content {
    padding: 16px 12px;
  }
  .help-content h2 {
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 12px;
  }
  .help-content h3 {
    font-size: 16px;
    margin-top: 18px;
  }
  .help-content p {
    font-size: 13px;
  }
  .help-content li {
    font-size: 13px;
    padding: 10px 0 10px 28px;
  }
  .countdown {
    font-size: 52px;
  }
  .final-score .score-value {
    font-size: 36px;
  }
  .final-score .score-label {
    font-size: 14px;
  }
  .final-score .level-label {
    font-size: 12px;
  }
  #startBtnContainer {
    margin: 16px 0 !important;
  }
}
