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

:root {
  --lego-red: #d01012;
  --lego-blue: #0057a8;
  --lego-yellow: #ffd700;
  --lego-green: #00852b;
  --lego-orange: #f57c20;
  --lego-dark: #1e1e1e;
  --lego-gray: #3a3a3a;
  --lego-light-gray: #5a5a5a;

  --nature: #00852b;
  --vehicles: #0057a8;
  --buildings: #d01012;
  --things: #f57c20;

  --bg: #fef9e7;
  --text: #1e1e1e;
  --text-muted: #7a7a7a;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 0 #d4c96b, 0 6px 12px rgba(0,0,0,0.15);
  --brick-radius: 10px;
}

body {
  font-family: 'Fredoka', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ========== Screens ========== */
.screen {
  display: none;
  min-height: 100dvh;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.screen.active {
  display: flex;
  justify-content: center;
}

.screen.visible {
  opacity: 1;
}

.screen.fading-out {
  opacity: 0;
}

.screen-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  padding-bottom: 5rem;
  gap: 1rem;
  width: 100%;
  max-width: 420px;
}

.screen-inner.centered {
  justify-content: center;
  min-height: 100dvh;
}

/* ========== LEGO Studs ========== */
.stud-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: -6px;
  position: relative;
  z-index: 1;
}

.stud-row.small {
  gap: 8px;
  margin-bottom: -4px;
}

.stud {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lego-red);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.3), 0 2px 2px rgba(0,0,0,0.15);
}

.stud-row.small .stud {
  width: 16px;
  height: 16px;
}

/* ========== Brick Card ========== */
.brick-card {
  background: var(--card-bg);
  border-radius: var(--brick-radius);
  box-shadow: var(--card-shadow);
  padding: 1.25rem 1.5rem;
  width: 100%;
  text-align: center;
}

/* ========== Buttons ========== */
.btn {
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.02em;
  text-align: center;
}

.btn:active {
  transform: scale(0.96) translateY(2px);
}

.btn-primary {
  background: var(--lego-red);
  color: white;
  box-shadow: 0 4px 0 #a00e0e;
}

.btn-primary:active {
  box-shadow: 0 2px 0 #a00e0e;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border: 3px solid var(--lego-dark);
  box-shadow: 0 4px 0 #bbb;
}

.btn-secondary:active {
  box-shadow: 0 2px 0 #bbb;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  text-decoration: underline;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
  width: 100%;
  max-width: 320px;
}

/* ========== Home ========== */
.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  gap: 1rem;
  padding: 1.5rem;
}

.lego-logo {
  background: var(--lego-yellow);
  border-radius: 16px;
  padding: 1.5rem 2rem 1.25rem;
  box-shadow: 0 6px 0 #c9a600, 0 8px 16px rgba(0,0,0,0.2);
  text-align: center;
}

.lego-logo .stud {
  background: var(--lego-yellow);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 0 2px 2px rgba(0,0,0,0.1);
  border: 2px solid rgba(0,0,0,0.1);
}

.title {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--lego-dark);
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ========== Player Setup ========== */
#screen-setup .screen-inner {
  padding-top: 1.5rem;
}

#player-inputs {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.player-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.player-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lego-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.player-name-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 3px solid #ddd;
  background: white;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

.player-name-input:focus {
  border-color: var(--lego-blue);
}

.btn-remove-player {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.setup-options {
  margin: 0.25rem 0;
  color: var(--text-muted);
  font-weight: 600;
}

.setup-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.setup-options select {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 3px solid #ddd;
  background: white;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 700;
}

/* ========== Turn Screen ========== */
.round-info {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.builder-card {
  background: var(--lego-yellow);
  box-shadow: 0 4px 0 #c9a600, 0 6px 12px rgba(0,0,0,0.15);
}

.builder-card .stud {
  background: var(--lego-yellow);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 0 2px 2px rgba(0,0,0,0.1);
  border: 2px solid rgba(0,0,0,0.1);
}

.builder-card h2 {
  font-size: 1.8rem;
}

.turn-subtitle {
  color: var(--lego-dark);
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.7;
}

/* ========== Dice ========== */
#dice-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
}

.dice {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: var(--lego-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: white;
  transition: transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow: 0 6px 0 #222, 0 8px 12px rgba(0,0,0,0.3);
}

.dice:active {
  transform: scale(0.95) translateY(3px);
  box-shadow: 0 3px 0 #222, 0 4px 8px rgba(0,0,0,0.3);
}

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

@keyframes dice-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  20% { transform: translateX(-6px) rotate(-5deg); }
  40% { transform: translateX(6px) rotate(5deg); }
  60% { transform: translateX(-4px) rotate(-3deg); }
  80% { transform: translateX(4px) rotate(3deg); }
}

.dice.rolling {
  animation: dice-roll 0.5s ease-out;
}

@keyframes dice-roll {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(90deg) scale(0.8); }
  50% { transform: rotate(180deg) scale(1.1); }
  75% { transform: rotate(270deg) scale(0.9); }
  100% { transform: rotate(360deg) scale(1); }
}

.dice.landed {
  animation: dice-land 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dice-land {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.15); }
  75% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.dice.nature { background: var(--nature); box-shadow: 0 6px 0 #005a1c, 0 8px 12px rgba(0,0,0,0.3); }
.dice.vehicles { background: var(--vehicles); box-shadow: 0 6px 0 #003d75, 0 8px 12px rgba(0,0,0,0.3); }
.dice.buildings { background: var(--buildings); box-shadow: 0 6px 0 #900c0c, 0 8px 12px rgba(0,0,0,0.3); }
.dice.things { background: var(--things); box-shadow: 0 6px 0 #b85a10, 0 8px 12px rgba(0,0,0,0.3); }

.dice-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ========== Difficulty Selection ========== */
#difficulty-selection {
  text-align: center;
}

#difficulty-selection > p {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.difficulty-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-difficulty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  cursor: pointer;
  color: white;
  -webkit-tap-highlight-color: transparent;
}

.btn-difficulty .pts {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.85;
}

.btn-difficulty.easy {
  background: var(--lego-green);
  box-shadow: 0 4px 0 #005a1c;
}

.btn-difficulty.medium {
  background: var(--lego-orange);
  box-shadow: 0 4px 0 #b85a10;
}

.btn-difficulty.hard {
  background: var(--lego-red);
  box-shadow: 0 4px 0 #900c0c;
}

.btn-difficulty:active {
  transform: scale(0.95) translateY(2px);
}

/* ========== Word Reveal ========== */
.badge-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.category-badge, .difficulty-badge {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
}

.category-badge.nature { background: var(--nature); }
.category-badge.vehicles { background: var(--vehicles); }
.category-badge.buildings { background: var(--buildings); }
.category-badge.things { background: var(--things); }

.difficulty-badge.easy { background: var(--lego-green); }
.difficulty-badge.medium { background: var(--lego-orange); }
.difficulty-badge.hard { background: var(--lego-red); }

.word-card-perspective {
  perspective: 800px;
  width: 100%;
  max-width: 340px;
}

.word-card {
  width: 100%;
  min-height: 180px;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.word-card.word-hidden {
  transform: rotateY(0deg);
}

.word-card:not(.word-hidden) {
  transform: rotateY(180deg);
}

.word-card-front, .word-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.5rem;
}

.word-card-front {
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

.word-card-back {
  background: var(--lego-green);
  box-shadow: 0 4px 0 #005a1c, 0 6px 12px rgba(0,0,0,0.15);
  color: white;
  transform: rotateY(180deg);
}

.tap-icon {
  font-size: 2.5rem;
}

.word-card-front p {
  color: var(--text-muted);
  font-weight: 600;
}

.secret-word {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

.word-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ========== Timer ========== */
.timer-container {
  position: relative;
  width: 100px;
  height: 100px;
}

.timer-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg {
  fill: none;
  stroke: #e0e0e0;
  stroke-width: 6;
}

.timer-ring-progress {
  fill: none;
  stroke: var(--lego-green);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 282.74;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-ring-progress.warning {
  stroke: var(--lego-red);
}

.timer-container.warning {
  animation: timer-pulse 1s ease-in-out infinite;
}

@keyframes timer-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.timer-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.timer-container.warning .timer-text {
  color: var(--lego-red);
}

.timer-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timer-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--lego-blue);
}

/* ========== Guessing Phase ========== */
.guess-card {
  background: var(--lego-blue);
  color: white;
  box-shadow: 0 4px 0 #003d75, 0 6px 12px rgba(0,0,0,0.15);
}

.guess-card h2 {
  font-size: 1.8rem;
}

.guess-subtitle {
  opacity: 0.8;
  font-size: 1.1rem;
  font-weight: 600;
}

.guess-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

/* ========== Select Guesser ========== */
#guesser-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
}

.btn-guesser {
  background: var(--card-bg);
  color: var(--text);
  border: 3px solid var(--lego-blue);
  border-radius: 10px;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 3px 0 #ccc;
}

.btn-guesser:active {
  transform: scale(0.97) translateY(2px);
  box-shadow: 0 1px 0 #ccc;
}

/* ========== Score Result ========== */
.score-result {
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 600;
}

.score-result .points-gained {
  color: var(--lego-green);
  font-weight: 700;
}

/* ========== Score Animations ========== */
.points-animate {
  display: inline-block;
  animation: points-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes points-bounce {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

/* Confetti */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall 1.5s ease-out forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Scoreboard bar score transition */
.sb-score {
  transition: transform 0.3s ease;
}

.sb-score.bump {
  animation: score-bump 0.4s ease;
}

@keyframes score-bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ========== Full Scoreboard ========== */
.scoreboard-full {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 1.05rem;
  box-shadow: 0 3px 0 #ddd;
}

.score-row .rank {
  color: var(--text-muted);
  font-size: 0.9rem;
  min-width: 2rem;
  font-weight: 700;
}

.score-row .name {
  flex: 1;
  font-weight: 700;
}

.score-row .score {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--lego-red);
}

.score-row.first-place {
  border: 3px solid var(--lego-yellow);
  background: #fffdf0;
}

/* ========== Game Over ========== */
.winner-display {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--lego-yellow);
  box-shadow: 0 4px 0 #c9a600, 0 6px 12px rgba(0,0,0,0.15);
}

.winner-display .trophy {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ========== Game Summary ========== */
.game-stats {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: 0 3px 0 #ddd;
  text-align: center;
  flex: 1;
  min-width: 140px;
}

.stat-card .stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--lego-red);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.game-history {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  box-shadow: 0 2px 0 #eee;
  gap: 0.5rem;
}

.history-row .history-word {
  font-weight: 700;
  flex: 1;
}

.history-row .history-result {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-row .history-result.correct {
  color: var(--lego-green);
}

/* ========== Running Scoreboard Bar ========== */
.scoreboard-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--lego-dark);
  padding: 0.5rem 0.75rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
}

.scoreboard-bar-inner {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  max-width: 500px;
  margin: 0 auto;
}

.sb-player {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--lego-gray);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

.sb-player.active {
  background: var(--lego-blue);
  box-shadow: 0 0 0 2px var(--lego-yellow);
}

.sb-player .sb-score {
  background: rgba(255,255,255,0.2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.sb-player.leading .sb-score {
  background: var(--lego-yellow);
  color: var(--lego-dark);
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1.5rem;
  animation: modal-fade-in 0.2s ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  max-width: 340px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: modal-slide-up 0.25s ease;
}

@keyframes modal-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-message {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
}

.modal-actions .btn {
  flex: 1;
}

/* ========== How to Play ========== */
.how-to-play-card {
  max-width: 380px;
}

.how-to-play-card h2 {
  margin-bottom: 0.25rem;
}

.how-to-play-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.htp-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.htp-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
}

.htp-step strong {
  font-size: 0.95rem;
}

.htp-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.1rem;
}

/* ========== Theme Picker ========== */
.theme-picker {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.theme-btn {
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 2px solid #ccc;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.theme-btn.active {
  border-color: var(--lego-blue);
  background: var(--lego-blue);
  color: white;
}

/* ========================================== */
/* ========== ALBY'S PARTY THEME ========== */
/* ========================================== */
[data-theme="albys-party"] {
  --lego-red: #ff3c7d;
  --lego-blue: #00e5ff;
  --lego-yellow: #ffd700;
  --lego-green: #39ff14;
  --lego-orange: #f5a623;
  --lego-dark: #0a0a20;
  --lego-gray: #2a2a5a;
  --lego-light-gray: #4a4a7a;

  --nature: #39ff14;
  --vehicles: #00e5ff;
  --buildings: #ff3c7d;
  --things: #f5a623;

  --bg: #12122e;
  --text: #f0f0f0;
  --text-muted: #8a8ab0;
  --card-bg: #1e1e50;
  --card-shadow: 0 4px 0 #0d0d25, 0 0 16px rgba(179, 71, 217, 0.2);
  --brick-radius: 10px;
}

/* Background pattern — star dots */
[data-theme="albys-party"] body,
body[data-theme="albys-party"] {
  background: #12122e;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Title — pixel font + neon green */
[data-theme="albys-party"] .title {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.8rem;
  color: #39ff14;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5), 0 0 30px rgba(57, 255, 20, 0.2);
  line-height: 1.4;
}

/* Logo block — dark purple with neon border */
[data-theme="albys-party"] .lego-logo {
  background: #2a1a4e;
  box-shadow: 0 0 20px rgba(179, 71, 217, 0.4), inset 0 0 20px rgba(179, 71, 217, 0.1);
  border: 2px solid rgba(179, 71, 217, 0.5);
}

[data-theme="albys-party"] .lego-logo .stud {
  background: #b347d9;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.3), 0 0 6px rgba(179, 71, 217, 0.5);
  border: 2px solid rgba(255,255,255,0.1);
}

/* Subtitle */
[data-theme="albys-party"] .subtitle {
  color: #b347d9;
}

/* Primary button — neon green */
[data-theme="albys-party"] .btn-primary {
  background: #39ff14;
  color: #0a0a20;
  box-shadow: 0 4px 0 #1a8a0a, 0 0 12px rgba(57, 255, 20, 0.3);
}

[data-theme="albys-party"] .btn-primary:active {
  box-shadow: 0 2px 0 #1a8a0a, 0 0 8px rgba(57, 255, 20, 0.3);
}

/* Secondary button — neon cyan border */
[data-theme="albys-party"] .btn-secondary {
  background: transparent;
  color: #00e5ff;
  border: 3px solid #00e5ff;
  box-shadow: 0 4px 0 #004a55, 0 0 8px rgba(0, 229, 255, 0.15);
}

[data-theme="albys-party"] .btn-secondary:active {
  box-shadow: 0 2px 0 #004a55;
}

/* Ghost button — neon cyan */
[data-theme="albys-party"] .btn-ghost {
  color: #00e5ff;
}

/* Theme picker in party mode */
[data-theme="albys-party"] .theme-btn {
  border-color: #4a4a7a;
  color: #8a8ab0;
}

[data-theme="albys-party"] .theme-btn.active {
  border-color: #b347d9;
  background: #b347d9;
  color: white;
}

/* Inputs — dark bg */
[data-theme="albys-party"] .player-name-input {
  background: #1a1a40;
  border-color: #3a3a6a;
  color: #f0f0f0;
}

[data-theme="albys-party"] .player-name-input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

[data-theme="albys-party"] .player-name-input::placeholder {
  color: #5a5a8a;
}

/* Selects */
[data-theme="albys-party"] .setup-options select {
  background: #1a1a40;
  border-color: #3a3a6a;
  color: #f0f0f0;
}

/* Player number badge */
[data-theme="albys-party"] .player-number {
  background: #b347d9;
}

/* Remove player button */
[data-theme="albys-party"] .btn-remove-player {
  color: #5a5a8a;
}

/* Dice — dark with neon glow on category */
[data-theme="albys-party"] .dice {
  background: #2a2a5a;
  box-shadow: 0 6px 0 #15153a, 0 0 16px rgba(179, 71, 217, 0.2);
}

[data-theme="albys-party"] .dice:active {
  box-shadow: 0 3px 0 #15153a, 0 0 8px rgba(179, 71, 217, 0.2);
}

[data-theme="albys-party"] .dice.nature {
  background: #1a3a1a;
  box-shadow: 0 6px 0 #0a200a, 0 0 16px rgba(57, 255, 20, 0.3);
}

[data-theme="albys-party"] .dice.vehicles {
  background: #0a2a3a;
  box-shadow: 0 6px 0 #051520, 0 0 16px rgba(0, 229, 255, 0.3);
}

[data-theme="albys-party"] .dice.buildings {
  background: #3a1a2a;
  box-shadow: 0 6px 0 #200a15, 0 0 16px rgba(255, 60, 125, 0.3);
}

[data-theme="albys-party"] .dice.things {
  background: #3a2a1a;
  box-shadow: 0 6px 0 #201a0a, 0 0 16px rgba(245, 166, 35, 0.3);
}

/* Difficulty buttons — neon tinted */
[data-theme="albys-party"] .btn-difficulty.easy {
  background: #1a5a1a;
  box-shadow: 0 4px 0 #0a300a, 0 0 10px rgba(57, 255, 20, 0.2);
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.4);
}

[data-theme="albys-party"] .btn-difficulty.medium {
  background: #5a3a0a;
  box-shadow: 0 4px 0 #3a2505, 0 0 10px rgba(245, 166, 35, 0.2);
  text-shadow: 0 0 6px rgba(245, 166, 35, 0.4);
}

[data-theme="albys-party"] .btn-difficulty.hard {
  background: #5a1a2a;
  box-shadow: 0 4px 0 #3a0a15, 0 0 10px rgba(255, 60, 125, 0.2);
  text-shadow: 0 0 6px rgba(255, 60, 125, 0.4);
}

/* Word card front */
[data-theme="albys-party"] .word-card-front {
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

/* Word card back — neon green */
[data-theme="albys-party"] .word-card-back {
  background: #1a4a1a;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3), 0 4px 0 #0a250a;
  color: #39ff14;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.5);
}

/* Guess card — neon cyan tint */
[data-theme="albys-party"] .guess-card {
  background: #0a2a3a;
  box-shadow: 0 4px 0 #051520, 0 0 12px rgba(0, 229, 255, 0.2);
}

/* Guesser buttons */
[data-theme="albys-party"] .btn-guesser {
  background: #1e1e50;
  color: #f0f0f0;
  border-color: #b347d9;
  box-shadow: 0 3px 0 #0d0d25, 0 0 8px rgba(179, 71, 217, 0.15);
}

/* Score rows */
[data-theme="albys-party"] .score-row {
  background: #1e1e50;
  box-shadow: 0 3px 0 #0d0d25;
}

[data-theme="albys-party"] .score-row .score {
  color: #39ff14;
}

[data-theme="albys-party"] .score-row.first-place {
  border-color: #ffd700;
  background: #2a2a1a;
  box-shadow: 0 3px 0 #0d0d25, 0 0 10px rgba(255, 215, 0, 0.15);
}

/* Points gained */
[data-theme="albys-party"] .score-result .points-gained {
  color: #39ff14;
  text-shadow: 0 0 6px rgba(57, 255, 20, 0.3);
}

/* Winner display — dark purple with neon */
[data-theme="albys-party"] .winner-display {
  background: #2a1a4e;
  box-shadow: 0 0 20px rgba(179, 71, 217, 0.3), 0 4px 0 #15082a;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

/* Stat cards */
[data-theme="albys-party"] .stat-card {
  background: #1e1e50;
  box-shadow: 0 3px 0 #0d0d25;
}

[data-theme="albys-party"] .stat-card .stat-value {
  color: #00e5ff;
}

/* History rows */
[data-theme="albys-party"] .history-row {
  background: #1e1e50;
  box-shadow: 0 2px 0 #0d0d25;
}

[data-theme="albys-party"] .history-row .history-result.correct {
  color: #39ff14;
}

/* Scoreboard bar */
[data-theme="albys-party"] .scoreboard-bar {
  background: #0a0a20;
  box-shadow: 0 -4px 12px rgba(179, 71, 217, 0.15);
}

[data-theme="albys-party"] .sb-player {
  background: #1e1e50;
}

[data-theme="albys-party"] .sb-player.active {
  background: #3a1a5a;
  box-shadow: 0 0 0 2px #b347d9;
}

[data-theme="albys-party"] .sb-player.leading .sb-score {
  background: #ffd700;
  color: #0a0a20;
}

/* Timer */
[data-theme="albys-party"] .timer-ring-bg {
  stroke: #2a2a5a;
}

[data-theme="albys-party"] .timer-ring-progress {
  stroke: #39ff14;
}

[data-theme="albys-party"] .timer-ring-progress.warning {
  stroke: #ff3c7d;
}

[data-theme="albys-party"] .timer-container.warning .timer-text {
  color: #ff3c7d;
}

/* Modals */
[data-theme="albys-party"] .modal-overlay {
  background: rgba(10, 10, 32, 0.8);
}

/* Checkbox accent */
[data-theme="albys-party"] .timer-toggle input[type="checkbox"] {
  accent-color: #b347d9;
}

/* h3 headings */
[data-theme="albys-party"] h3 {
  color: #8a8ab0;
}

/* Turn subtitle */
[data-theme="albys-party"] .turn-subtitle {
  color: #8a8ab0;
  opacity: 1;
}

/* Builder card in party — remove yellow */
[data-theme="albys-party"] .builder-card {
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
}

/* ========== Utility ========== */
.hidden {
  display: none !important;
}

h2 {
  text-align: center;
}

h3 {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========== Mobile Polish ========== */

/* Prevent zoom on inputs */
input, select, textarea {
  font-size: 16px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .screen {
    transition: none;
  }

  .word-card {
    transition: none;
  }

  .dice.rolling {
    animation: none;
  }

  .dice.shaking {
    animation: none;
  }

  .dice.landed {
    animation: none;
  }

  .confetti-container {
    display: none;
  }
}

/* ========== Responsive ========== */
@media (max-width: 400px) {
  .title {
    font-size: 2.2rem;
  }

  [data-theme="albys-party"] .title {
    font-size: 1.4rem;
  }

  .btn-large {
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
  }

  .dice {
    width: 100px;
    height: 100px;
  }

  .secret-word {
    font-size: 1.8rem;
  }

  .difficulty-buttons {
    gap: 0.5rem;
  }

  .btn-difficulty {
    padding: 0.8rem 1rem;
    font-size: 1rem;
  }

  .sb-player {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}
