/* ============================================================
   EcoFin: El Juego del Destino — Premium Stylesheet
   ============================================================
   A comprehensive, production-quality CSS file featuring
   glassmorphism, CSS-art house with 5 transformation levels,
   card flip animations, floating particles, and rich keyframes.
   ============================================================ */

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

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Primary — Emerald Green */
  --clr-primary-400: #10b981;
  --clr-primary-500: #059669;
  --clr-primary-600: #047857;
  --clr-primary-700: #065f46;

  /* Accent — Warm Gold */
  --clr-accent-400: #fbbf24;
  --clr-accent-500: #f59e0b;
  --clr-accent-600: #d97706;

  /* Social — Royal Blue */
  --clr-social-400: #60a5fa;
  --clr-social-500: #3b82f6;
  --clr-social-600: #2563eb;

  /* Danger — Soft Red */
  --clr-danger-400: #f87171;
  --clr-danger-500: #ef4444;
  --clr-danger-600: #dc2626;

  /* Background — Deep Dark */
  --clr-bg-900: #0f172a;
  --clr-bg-800: #1e293b;
  --clr-bg-700: #334155;

  /* Surface — Glass */
  --clr-surface: rgba(255, 255, 255, 0.08);
  --clr-surface-border: rgba(255, 255, 255, 0.15);
  --clr-surface-hover: rgba(255, 255, 255, 0.14);

  /* Text */
  --clr-text: #f8fafc;
  --clr-text-muted: #94a3b8;
  --clr-text-dim: #64748b;

  /* Spacing */
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.4), 0 0 60px rgba(16, 185, 129, 0.15);
  --shadow-glow-gold: 0 0 20px rgba(245, 158, 11, 0.4), 0 0 60px rgba(245, 158, 11, 0.15);
  --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 60px rgba(59, 130, 246, 0.15);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-house: 1.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index */
  --z-particles: 0;
  --z-content: 1;
  --z-overlay: 10;
  --z-modal: 100;
  --z-tooltip: 200;

  /* Font families */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--clr-bg-900);
  color: var(--clr-text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient gradient background that persists across all screens */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(16, 185, 129, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(245, 158, 11, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

a {
  color: var(--clr-primary-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--clr-primary-500);
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

/* ── Selection & Scrollbar ────────────────────────────────── */
::selection {
  background: rgba(16, 185, 129, 0.35);
  color: var(--clr-text);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg-800);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-primary-600);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-primary-500);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--clr-primary-600) var(--clr-bg-800);
}

/* ── Focus Styles (Accessibility) ─────────────────────────── */
:focus-visible {
  outline: 2px solid var(--clr-primary-400);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--clr-accent-500);
  outline-offset: 3px;
}

/* ── Glassmorphism Utility ────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
}

/* ── Glow Utilities ───────────────────────────────────────── */
.glow-green {
  box-shadow: var(--shadow-glow-green);
}

.glow-gold {
  box-shadow: var(--shadow-glow-gold);
}

.glow-blue {
  box-shadow: var(--shadow-glow-blue);
}

/* ── Shake & Celebrate ────────────────────────────────────── */
.shake {
  animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.celebrate {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) both,
             glow 1.5s ease-in-out infinite;
}

/* ============================================================
   SCREEN SYSTEM
   ============================================================ */
.screen {
  display: none;
  min-height: 100vh;
  width: 100%;
  position: relative;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.6s ease-out both;
}

/* ============================================================
   SCREEN: INTRO (.screen-intro)
   ============================================================ */
.screen-intro {
  justify-content: center;
  gap: var(--sp-xl);
  padding: var(--sp-xl);
  text-align: center;
  overflow: hidden;
}

.screen-intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(245, 158, 11, 0.15) 0%, transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  z-index: var(--z-particles);
  pointer-events: none;
}

.screen-intro .logo {
  position: relative;
  z-index: var(--z-content);
  animation: slideUp 0.8s ease-out both;
}

.screen-intro .logo h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--clr-primary-400), var(--clr-accent-500), var(--clr-primary-400));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
  letter-spacing: -0.02em;
}

.screen-intro .logo .subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--clr-text-muted);
  font-weight: 300;
  margin-top: var(--sp-sm);
  animation: slideUp 0.8s 0.2s ease-out both;
}

.screen-intro .logo .tagline {
  font-size: clamp(0.85rem, 1.5vw, 1.1rem);
  color: var(--clr-text-dim);
  margin-top: var(--sp-md);
  animation: slideUp 0.8s 0.4s ease-out both;
}

/* ============================================================
   SCREEN: CHARACTER SELECTION (.screen-character)
   ============================================================ */
.screen-character {
  justify-content: center;
  gap: var(--sp-2xl);
  padding: var(--sp-xl);
}

.screen-character h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  animation: slideUp 0.6s ease-out both;
}

.character-grid {
  display: flex;
  gap: var(--sp-lg);
  justify-content: center;
  flex-wrap: wrap;
  perspective: 1200px;
}

/* ── Character Card ───────────────────────────────────────── */
.character-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--sp-xl) var(--sp-lg);
  width: 220px;
  text-align: center;
  cursor: pointer;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    background var(--transition-base);
  position: relative;
  overflow: hidden;
  animation: slideUp 0.6s ease-out both;
}

.character-card:nth-child(1) { animation-delay: 0.1s; }
.character-card:nth-child(2) { animation-delay: 0.2s; }
.character-card:nth-child(3) { animation-delay: 0.3s; }

.character-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.character-card:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: var(--shadow-glow-green);
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.character-card:hover::before {
  opacity: 1;
}

.character-card .character-emoji {
  font-size: 4rem;
  display: block;
  margin-bottom: var(--sp-md);
  transition: transform var(--transition-base);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.character-card:hover .character-emoji {
  transform: scale(1.15) rotate(-5deg);
}

.character-card .character-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--sp-xs);
}

.character-card .character-desc {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  line-height: 1.4;
}

/* Selected State */
.character-card.selected {
  border-color: var(--clr-accent-500);
  background: rgba(245, 158, 11, 0.1);
  box-shadow:
    0 0 24px rgba(245, 158, 11, 0.3),
    0 0 60px rgba(245, 158, 11, 0.1),
    inset 0 0 30px rgba(245, 158, 11, 0.05);
  animation: pulse 2s ease-in-out infinite;
}

.character-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  background: var(--clr-accent-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #000;
  animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
}

/* Roulette Animation */
.character-card.roulette-spinning {
  animation: rouletteSpin 0.15s ease-in-out infinite alternate;
}

@keyframes rouletteSpin {
  0%   { transform: scale(0.95) rotateY(0deg); opacity: 0.6; }
  100% { transform: scale(1.05) rotateY(15deg); opacity: 1; }
}

.character-card.roulette-highlight {
  border-color: var(--clr-accent-400);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
  transform: scale(1.08);
}

.character-card.roulette-landed {
  animation: bounceIn 0.7s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
  border-color: var(--clr-accent-500);
  box-shadow:
    0 0 40px rgba(245, 158, 11, 0.5),
    0 0 80px rgba(245, 158, 11, 0.2);
}

/* ============================================================
   SCREEN: GAME (.screen-game)
   ============================================================ */
.screen-game {
  padding: var(--sp-md);
  gap: var(--sp-md);
}

.screen-game.active {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "stats"
    "main"
    "actions";
  min-height: 100vh;
  animation: fadeIn 0.6s ease-out both;
}

.game-main {
  grid-area: main;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  align-items: start;
}

.game-actions {
  grid-area: actions;
}

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
  grid-area: stats;
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
  flex-wrap: wrap;
  padding: var(--sp-md) var(--sp-lg);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  animation: slideUp 0.5s ease-out both;
}

.stat {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 180px;
  transition: box-shadow var(--transition-base), transform var(--transition-fast);
}

.stat:hover {
  transform: translateY(-2px);
}

.stat .stat-emoji {
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

.stat .stat-info {
  flex: 1;
}

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

.stat .stat-value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  transition: color var(--transition-fast);
}

.stat .stat-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 4px;
}

.stat .stat-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Stat-specific colors */
.stat--eco .stat-bar-fill {
  background: linear-gradient(90deg, var(--clr-accent-500), var(--clr-accent-400));
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.stat--karma .stat-bar-fill {
  background: linear-gradient(90deg, var(--clr-primary-500), var(--clr-primary-400));
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.stat--social .stat-bar-fill {
  background: linear-gradient(90deg, var(--clr-social-500), var(--clr-social-400));
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

/* Glow when value changes */
.stat.stat-changed {
  animation: statGlow 0.8s ease-out;
}

@keyframes statGlow {
  0%   { box-shadow: 0 0 0 rgba(255,255,255,0); transform: scale(1); }
  50%  { box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); transform: scale(1.03); }
  100% { box-shadow: 0 0 0 rgba(255,255,255,0); transform: scale(1); }
}

.stat--eco.stat-changed   { animation-name: statGlowGold; }
.stat--karma.stat-changed { animation-name: statGlowGreen; }
.stat--social.stat-changed{ animation-name: statGlowBlue; }

@keyframes statGlowGold {
  0%   { box-shadow: 0 0 0 rgba(245,158,11,0); }
  50%  { box-shadow: 0 0 24px rgba(245,158,11,0.4); }
  100% { box-shadow: 0 0 0 rgba(245,158,11,0); }
}

@keyframes statGlowGreen {
  0%   { box-shadow: 0 0 0 rgba(16,185,129,0); }
  50%  { box-shadow: 0 0 24px rgba(16,185,129,0.4); }
  100% { box-shadow: 0 0 0 rgba(16,185,129,0); }
}

@keyframes statGlowBlue {
  0%   { box-shadow: 0 0 0 rgba(59,130,246,0); }
  50%  { box-shadow: 0 0 24px rgba(59,130,246,0.4); }
  100% { box-shadow: 0 0 0 rgba(59,130,246,0); }
}

/* ============================================================
   HOUSE VISUALIZATION (.house-container)
   ============================================================
   The most important visual element.
   CSS-art house built entirely from divs and pseudo-elements.
   5 levels that morph smoothly via CSS transitions.
   ============================================================ */
.house-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 380px;
  padding: var(--sp-lg);
  position: relative;
}

.house {
  position: relative;
  width: 260px;
  height: 300px;
  transition: all var(--transition-house);
}

/* ── Ground ───────────────────────────────────────────────── */
.house-ground {
  position: absolute;
  bottom: 0;
  left: -40px;
  right: -40px;
  height: 40px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transition: background var(--transition-house), box-shadow var(--transition-house);
}

/* ── House Body ───────────────────────────────────────────── */
.house-body {
  position: absolute;
  bottom: 30px;
  left: 30px;
  right: 30px;
  height: 150px;
  border-radius: 4px 4px 0 0;
  transition: all var(--transition-house);
  overflow: hidden;
}

/* ── Roof ─────────────────────────────────────────────────── */
.house-roof {
  position: absolute;
  bottom: 175px;
  left: 10px;
  right: 10px;
  height: 0;
  border-left: 120px solid transparent;
  border-right: 120px solid transparent;
  border-bottom: 80px solid #555;
  transition: border-color var(--transition-house);
}

/* ── Door ─────────────────────────────────────────────────── */
.house-door {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 55px;
  border-radius: 18px 18px 0 0;
  transition: all var(--transition-house);
}

.house-door::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  transition: background var(--transition-house);
}

/* ── Windows ──────────────────────────────────────────────── */
.house-window {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  transition: all var(--transition-house);
  overflow: hidden;
}

.house-window--left {
  bottom: 105px;
  left: 48px;
}

.house-window--right {
  bottom: 105px;
  right: 48px;
}

.house-window::before {
  content: '';
  position: absolute;
  inset: 0;
  border-left: 1px solid rgba(255,255,255,0.3);
  border-top: 1px solid rgba(255,255,255,0.3);
  left: 50%;
  top: 50%;
}

/* ── Chimney ──────────────────────────────────────────────── */
.house-chimney {
  position: absolute;
  bottom: 230px;
  right: 70px;
  width: 20px;
  height: 35px;
  transition: all var(--transition-house);
}

/* ── Solar Panels ─────────────────────────────────────────── */
.house-solar {
  position: absolute;
  bottom: 210px;
  left: 50px;
  width: 50px;
  height: 22px;
  border-radius: 2px;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: all var(--transition-house);
  overflow: hidden;
}

.house-solar::before {
  content: '';
  position: absolute;
  inset: 2px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.2) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 12px 7px;
}

/* ── Plants ───────────────────────────────────────────────── */
.house-plants {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  height: 50px;
  pointer-events: none;
}

.house-plant {
  position: absolute;
  bottom: 0;
  transition: all var(--transition-house);
  opacity: 0;
  transform: scaleY(0);
  transform-origin: bottom center;
}

.house-plant::before {
  content: '';
  display: block;
  border-radius: 50%;
  transition: all var(--transition-house);
}

.house-plant::after {
  content: '';
  display: block;
  margin: 0 auto;
  transition: all var(--transition-house);
}

/* Individual plant positions */
.house-plant--1 { left: -20px; }
.house-plant--2 { left: 0px; }
.house-plant--3 { right: 0px; }
.house-plant--4 { right: -20px; }
.house-plant--5 { left: -35px; }
.house-plant--6 { right: -35px; }
.house-plant--7 { left: 50%; transform: translateX(-50%) scaleY(0); }

/* ── Trash Elements ───────────────────────────────────────── */
.house-trash {
  position: absolute;
  bottom: 25px;
  left: 0;
  right: 0;
  height: 30px;
  pointer-events: none;
}

.house-trash-item {
  position: absolute;
  border-radius: 2px;
  transition: opacity var(--transition-house), transform var(--transition-house);
}

.house-trash-item--1 {
  left: -15px;
  bottom: 0;
  width: 12px;
  height: 8px;
  background: #6b7280;
  transform: rotate(-15deg);
}

.house-trash-item--2 {
  right: -10px;
  bottom: 5px;
  width: 8px;
  height: 10px;
  background: #9ca3af;
  transform: rotate(20deg);
}

.house-trash-item--3 {
  left: 30px;
  bottom: -2px;
  width: 10px;
  height: 6px;
  background: #78716c;
  transform: rotate(35deg);
}

.house-trash-item--4 {
  right: 25px;
  bottom: 2px;
  width: 7px;
  height: 9px;
  background: #a8a29e;
  transform: rotate(-25deg);
}

.house-trash-item--5 {
  left: 50%;
  bottom: -3px;
  width: 14px;
  height: 5px;
  background: #737373;
  transform: rotate(10deg);
}

/* ── Decorative elements (butterflies, sparkles) ──────────── */
.house-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.house-decor-butterfly {
  position: absolute;
  font-size: 1rem;
  opacity: 0;
  transition: opacity var(--transition-house);
}

.house-decor-butterfly--1 {
  top: 20px;
  left: -30px;
  animation: butterflyFloat1 6s ease-in-out infinite;
}

.house-decor-butterfly--2 {
  top: 50px;
  right: -25px;
  animation: butterflyFloat2 7s ease-in-out infinite 1s;
}

.house-decor-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--clr-accent-400);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition-house);
}

.house-decor-sparkle--1 { top: 30px; left: 20px; animation: sparkle 2s ease-in-out infinite 0s; }
.house-decor-sparkle--2 { top: 60px; right: 30px; animation: sparkle 2s ease-in-out infinite 0.5s; }
.house-decor-sparkle--3 { top: 10px; left: 60%; animation: sparkle 2s ease-in-out infinite 1s; }
.house-decor-sparkle--4 { top: 80px; left: 10%; animation: sparkle 2s ease-in-out infinite 1.5s; }

@keyframes butterflyFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(15px, -10px) rotate(5deg); }
  50%      { transform: translate(5px, -20px) rotate(-3deg); }
  75%      { transform: translate(-10px, -8px) rotate(4deg); }
}

@keyframes butterflyFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-12px, -15px) rotate(-5deg); }
  50%      { transform: translate(-5px, -5px) rotate(3deg); }
  75%      { transform: translate(8px, -18px) rotate(-4deg); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0); }
  50%      { opacity: 0.8; transform: scale(1.5); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOUSE LEVEL 1 — Gloomy, dark, trashy
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.house.house-level-1 .house-ground {
  background: linear-gradient(180deg, #3b3228 0%, #2a231b 100%);
}

.house.house-level-1 .house-body {
  background: linear-gradient(180deg, #4a4540 0%, #3d3833 100%);
  border: 1px solid #55504a;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

/* Cracks effect */
.house.house-level-1 .house-body::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 15px;
  width: 40px;
  height: 2px;
  background: #2a2520;
  transform: rotate(-12deg);
  box-shadow:
    60px 30px 0 0 #2a2520,
    80px -5px 0 0 #2a2520;
}

.house.house-level-1 .house-roof {
  border-bottom-color: #555048;
  filter: brightness(0.7);
}

.house.house-level-1 .house-door {
  background: linear-gradient(180deg, #3a3530 0%, #2d2823 100%);
  border: 1px solid #4a4540;
}

.house.house-level-1 .house-door::after {
  background: #6b6560;
}

.house.house-level-1 .house-window {
  background: rgba(40, 35, 30, 0.8);
  border: 1px solid #55504a;
  box-shadow: none;
}

.house.house-level-1 .house-chimney {
  background: #4a4540;
  border: 1px solid #55504a;
}

/* Dim overlay */
.house.house-level-1::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  border-radius: inherit;
  transition: opacity var(--transition-house);
}

/* Trash visible */
.house.house-level-1 .house-trash-item {
  opacity: 1;
}

/* No plants */
.house.house-level-1 .house-plant { opacity: 0; transform: scaleY(0); }
.house.house-level-1 .house-solar { opacity: 0; transform: scaleY(0); }
.house.house-level-1 .house-decor-butterfly { opacity: 0; }
.house.house-level-1 .house-decor-sparkle { opacity: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOUSE LEVEL 2 — Slightly cleaner, warmer
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.house.house-level-2 .house-ground {
  background: linear-gradient(180deg, #4a3f2f 0%, #3b3226 100%);
}

.house.house-level-2 .house-body {
  background: linear-gradient(180deg, #5c554e 0%, #504a44 100%);
  border: 1px solid #6b6560;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

.house.house-level-2 .house-body::before {
  content: '';
  position: absolute;
  top: 25px;
  left: 20px;
  width: 30px;
  height: 1px;
  background: #3d3833;
  transform: rotate(-8deg);
}

.house.house-level-2 .house-roof {
  border-bottom-color: #6b6255;
  filter: brightness(0.8);
}

.house.house-level-2 .house-door {
  background: linear-gradient(180deg, #5a4d3f 0%, #4d4133 100%);
  border: 1px solid #6b6255;
}

.house.house-level-2 .house-door::after {
  background: #8b8275;
}

.house.house-level-2 .house-window {
  background: rgba(80, 70, 55, 0.6);
  border: 1px solid #6b6560;
  box-shadow: inset 0 0 8px rgba(200, 180, 120, 0.1);
}

.house.house-level-2 .house-chimney {
  background: #5c554e;
  border: 1px solid #6b6560;
}

.house.house-level-2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
  transition: opacity var(--transition-house);
}

/* Some trash removed */
.house.house-level-2 .house-trash-item--1 { opacity: 0; transform: scale(0) rotate(-15deg); }
.house.house-level-2 .house-trash-item--3 { opacity: 0; transform: scale(0) rotate(35deg); }
.house.house-level-2 .house-trash-item--5 { opacity: 0; transform: scale(0) rotate(10deg); }
.house.house-level-2 .house-trash-item--2 { opacity: 0.5; }
.house.house-level-2 .house-trash-item--4 { opacity: 0.5; }

/* One small plant */
.house.house-level-2 .house-plant--1 {
  opacity: 1;
  transform: scaleY(1);
}

.house.house-level-2 .house-plant--1::before {
  width: 14px;
  height: 14px;
  background: #4a7c59;
}

.house.house-level-2 .house-plant--1::after {
  width: 3px;
  height: 8px;
  background: #5a4a3a;
}

.house.house-level-2 .house-solar { opacity: 0; transform: scaleY(0); }
.house.house-level-2 .house-decor-butterfly { opacity: 0; }
.house.house-level-2 .house-decor-sparkle { opacity: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOUSE LEVEL 3 — Clean, pleasant, small garden
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.house.house-level-3 .house-ground {
  background: linear-gradient(180deg, #5a7a4a 0%, #4a6a3a 100%);
}

.house.house-level-3 .house-body {
  background: linear-gradient(180deg, #8b8580 0%, #7a7570 100%);
  border: 1px solid #9a9590;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.house.house-level-3 .house-body::before { display: none; }

.house.house-level-3 .house-roof {
  border-bottom-color: #8b7a6a;
  filter: brightness(0.95);
}

.house.house-level-3 .house-door {
  background: linear-gradient(180deg, #7a6550 0%, #6a5540 100%);
  border: 1px solid #8b7a6a;
}

.house.house-level-3 .house-door::after {
  background: #c0b090;
}

.house.house-level-3 .house-window {
  background: rgba(170, 200, 230, 0.35);
  border: 1px solid #9a9590;
  box-shadow: inset 0 0 12px rgba(200, 220, 255, 0.15);
}

.house.house-level-3 .house-chimney {
  background: #7a7570;
  border: 1px solid #8b8580;
}

.house.house-level-3::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.05);
  pointer-events: none;
  transition: opacity var(--transition-house);
}

/* No trash */
.house.house-level-3 .house-trash-item { opacity: 0; transform: scale(0); }

/* 2-3 plants */
.house.house-level-3 .house-plant--1,
.house.house-level-3 .house-plant--2,
.house.house-level-3 .house-plant--3 {
  opacity: 1;
  transform: scaleY(1);
}

.house.house-level-3 .house-plant--1::before {
  width: 18px;
  height: 18px;
  background: radial-gradient(circle, #5a9a5a 40%, #4a8a4a 100%);
}
.house.house-level-3 .house-plant--1::after {
  width: 3px; height: 10px; background: #6b5a4a;
}

.house.house-level-3 .house-plant--2::before {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #6aaa6a 40%, #5a9a5a 100%);
}
.house.house-level-3 .house-plant--2::after {
  width: 3px; height: 8px; background: #6b5a4a;
}

.house.house-level-3 .house-plant--3::before {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle, #5a9a5a 40%, #4a8a4a 100%);
}
.house.house-level-3 .house-plant--3::after {
  width: 3px; height: 9px; background: #6b5a4a;
}

.house.house-level-3 .house-solar { opacity: 0; transform: scaleY(0); }
.house.house-level-3 .house-decor-butterfly { opacity: 0; }
.house.house-level-3 .house-decor-sparkle { opacity: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOUSE LEVEL 4 — Beautiful, warm, solar panels
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.house.house-level-4 .house-ground {
  background: linear-gradient(180deg, #6a9a50 0%, #5a8a40 100%);
  box-shadow: 0 0 20px rgba(100, 180, 80, 0.15);
}

.house.house-level-4 .house-body {
  background: linear-gradient(180deg, #c4b8a8 0%, #b0a494 100%);
  border: 1px solid #d0c4b4;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.house.house-level-4 .house-body::before { display: none; }

.house.house-level-4 .house-roof {
  border-bottom-color: #b08a5a;
  filter: brightness(1);
}

.house.house-level-4 .house-door {
  background: linear-gradient(180deg, #a07a50 0%, #8a6a40 100%);
  border: 1px solid #b08a5a;
  box-shadow: 0 0 8px rgba(180, 150, 100, 0.2);
}

.house.house-level-4 .house-door::after {
  background: #e0c890;
  box-shadow: 0 0 3px rgba(255,200,100,0.4);
}

.house.house-level-4 .house-window {
  background: rgba(200, 220, 255, 0.5);
  border: 1px solid #c0b4a4;
  box-shadow:
    inset 0 0 15px rgba(255, 240, 200, 0.2),
    0 0 8px rgba(255, 240, 200, 0.15);
}

.house.house-level-4 .house-chimney {
  background: #b0a494;
  border: 1px solid #c0b4a4;
}

.house.house-level-4::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

/* No trash */
.house.house-level-4 .house-trash-item { opacity: 0; transform: scale(0); }

/* Multiple plants and small trees */
.house.house-level-4 .house-plant--1,
.house.house-level-4 .house-plant--2,
.house.house-level-4 .house-plant--3,
.house.house-level-4 .house-plant--4,
.house.house-level-4 .house-plant--5 {
  opacity: 1;
  transform: scaleY(1);
}

.house.house-level-4 .house-plant--1::before {
  width: 22px; height: 22px;
  background: radial-gradient(circle, #4aaa4a 30%, #3a8a3a 100%);
}
.house.house-level-4 .house-plant--1::after { width: 4px; height: 14px; background: #6b5040; }

.house.house-level-4 .house-plant--2::before {
  width: 18px; height: 18px;
  background: radial-gradient(circle, #5abb5a 30%, #4aaa4a 100%);
}
.house.house-level-4 .house-plant--2::after { width: 3px; height: 10px; background: #6b5040; }

.house.house-level-4 .house-plant--3::before {
  width: 20px; height: 20px;
  background: radial-gradient(circle, #4aaa4a 30%, #3a8a3a 100%);
}
.house.house-level-4 .house-plant--3::after { width: 3px; height: 12px; background: #6b5040; }

.house.house-level-4 .house-plant--4::before {
  width: 16px; height: 16px;
  background: radial-gradient(circle, #5abb5a 30%, #4aaa4a 100%);
}
.house.house-level-4 .house-plant--4::after { width: 3px; height: 8px; background: #6b5040; }

/* Small tree */
.house.house-level-4 .house-plant--5::before {
  width: 30px; height: 30px;
  background: radial-gradient(circle, #3a9a3a 20%, #2a7a2a 100%);
}
.house.house-level-4 .house-plant--5::after { width: 5px; height: 18px; background: #5a4030; }

/* Solar panel appears */
.house.house-level-4 .house-solar {
  opacity: 1;
  transform: scaleY(1);
  background: linear-gradient(180deg, #2a4a8a 0%, #1a3a7a 100%);
  border: 1px solid #3a5a9a;
}

.house.house-level-4 .house-decor-butterfly { opacity: 0; }
.house.house-level-4 .house-decor-sparkle { opacity: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HOUSE LEVEL 5 — Dream house! Vibrant, lush, alive
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.house.house-level-5 .house-ground {
  background: linear-gradient(180deg, #5acc5a 0%, #4abb4a 100%);
  box-shadow: 0 0 30px rgba(80, 200, 80, 0.25);
}

.house.house-level-5 .house-body {
  background: linear-gradient(180deg, #f0e8d8 0%, #e0d4c0 100%);
  border: 1px solid #f5efe5;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.12),
    0 0 40px rgba(16, 185, 129, 0.1);
}

.house.house-level-5 .house-body::before { display: none; }

.house.house-level-5 .house-roof {
  border-bottom-color: #c09050;
  filter: brightness(1.1) saturate(1.2);
}

.house.house-level-5 .house-door {
  background: linear-gradient(180deg, #b08040 0%, #9a7030 100%);
  border: 1px solid #c09050;
  box-shadow: 0 0 12px rgba(200, 160, 80, 0.3);
}

.house.house-level-5 .house-door::after {
  background: #ffd700;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}

.house.house-level-5 .house-window {
  background: rgba(255, 250, 220, 0.6);
  border: 1px solid #e0d4c0;
  box-shadow:
    inset 0 0 20px rgba(255, 240, 180, 0.3),
    0 0 12px rgba(255, 240, 180, 0.25);
}

.house.house-level-5 .house-chimney {
  background: #d4c4a8;
  border: 1px solid #e0d4c0;
}

.house.house-level-5::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

/* No trash */
.house.house-level-5 .house-trash-item { opacity: 0; transform: scale(0); }

/* Lush garden — all plants visible */
.house.house-level-5 .house-plant--1,
.house.house-level-5 .house-plant--2,
.house.house-level-5 .house-plant--3,
.house.house-level-5 .house-plant--4,
.house.house-level-5 .house-plant--5,
.house.house-level-5 .house-plant--6,
.house.house-level-5 .house-plant--7 {
  opacity: 1;
  transform: scaleY(1);
}

.house.house-level-5 .house-plant--7 {
  transform: translateX(-50%) scaleY(1);
}

.house.house-level-5 .house-plant--1::before {
  width: 26px; height: 26px;
  background: radial-gradient(circle, #3acc3a 20%, #2aaa2a 100%);
  box-shadow: 0 0 10px rgba(60, 200, 60, 0.3);
}
.house.house-level-5 .house-plant--1::after { width: 4px; height: 16px; background: #5a4030; }

.house.house-level-5 .house-plant--2::before {
  width: 20px; height: 20px;
  background: radial-gradient(circle, #4acc4a 20%, #3abb3a 100%);
  box-shadow: 0 0 8px rgba(60, 200, 60, 0.2);
}
.house.house-level-5 .house-plant--2::after { width: 3px; height: 12px; background: #5a4030; }

.house.house-level-5 .house-plant--3::before {
  width: 24px; height: 24px;
  background: radial-gradient(circle, #3acc3a 20%, #2aaa2a 100%);
  box-shadow: 0 0 10px rgba(60, 200, 60, 0.3);
}
.house.house-level-5 .house-plant--3::after { width: 4px; height: 14px; background: #5a4030; }

.house.house-level-5 .house-plant--4::before {
  width: 18px; height: 18px;
  background: radial-gradient(circle, #5acc5a 30%, #4abb4a 100%);
}
.house.house-level-5 .house-plant--4::after { width: 3px; height: 10px; background: #5a4030; }

/* Trees */
.house.house-level-5 .house-plant--5::before {
  width: 36px; height: 36px;
  background: radial-gradient(circle, #2a9a2a 15%, #1a7a1a 100%);
  box-shadow: 0 0 15px rgba(40, 160, 40, 0.3);
}
.house.house-level-5 .house-plant--5::after { width: 6px; height: 22px; background: #4a3020; }

.house.house-level-5 .house-plant--6::before {
  width: 32px; height: 32px;
  background: radial-gradient(circle, #2a9a2a 15%, #1a7a1a 100%);
  box-shadow: 0 0 12px rgba(40, 160, 40, 0.25);
}
.house.house-level-5 .house-plant--6::after { width: 5px; height: 20px; background: #4a3020; }

/* Flowers */
.house.house-level-5 .house-plant--7::before {
  width: 12px; height: 12px;
  background: radial-gradient(circle, #ff6b9d 30%, #e05080 100%);
  box-shadow: 0 0 8px rgba(255, 100, 150, 0.4);
}
.house.house-level-5 .house-plant--7::after { width: 2px; height: 10px; background: #5a9a3a; }

/* Solar panels active with glow */
.house.house-level-5 .house-solar {
  opacity: 1;
  transform: scaleY(1);
  background: linear-gradient(180deg, #3a5aaa 0%, #2a4a9a 100%);
  border: 1px solid #4a6abb;
  box-shadow: 0 0 15px rgba(60, 100, 200, 0.3);
  animation: solarGlow 3s ease-in-out infinite;
}

@keyframes solarGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(60, 100, 200, 0.2); }
  50%      { box-shadow: 0 0 25px rgba(60, 140, 255, 0.5), 0 0 50px rgba(60, 140, 255, 0.15); }
}

/* Butterflies visible */
.house.house-level-5 .house-decor-butterfly { opacity: 0.8; }

/* Sparkles visible */
.house.house-level-5 .house-decor-sparkle { opacity: 1; }

/* Rainbow arc above house */
.house.house-level-5::before {
  content: '';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 130px;
  border-radius: 260px 260px 0 0;
  background: transparent;
  border-top: 3px solid rgba(255, 0, 0, 0.15);
  border-left: 3px solid rgba(255, 165, 0, 0.12);
  border-right: 3px solid rgba(0, 0, 255, 0.12);
  box-shadow:
    inset 0 4px 0 rgba(255, 165, 0, 0.1),
    inset 0 8px 0 rgba(255, 255, 0, 0.08),
    inset 0 12px 0 rgba(0, 255, 0, 0.08),
    inset 0 16px 0 rgba(0, 0, 255, 0.06),
    inset 0 20px 0 rgba(75, 0, 130, 0.05);
  opacity: 0.6;
  animation: fadeIn 2s ease-out both;
  pointer-events: none;
}

/* ============================================================
   SURPRISE CARD (.surprise-card)
   ============================================================ */
.surprise-card {
  perspective: 800px;
  width: 280px;
  height: 380px;
  cursor: pointer;
}

.surprise-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.surprise-card.flipped .surprise-card-inner {
  transform: rotateY(180deg);
}

.surprise-card-front,
.surprise-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

/* Card Back — Decorative pattern */
.surprise-card-front {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(16, 185, 129, 0.15) 0px,
      rgba(16, 185, 129, 0.15) 2px,
      transparent 2px,
      transparent 12px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(245, 158, 11, 0.1) 0px,
      rgba(245, 158, 11, 0.1) 2px,
      transparent 2px,
      transparent 12px
    ),
    linear-gradient(135deg, var(--clr-bg-800) 0%, var(--clr-bg-900) 100%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.surprise-card-front::before {
  content: '🃏';
  font-size: 4rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  animation: float 3s ease-in-out infinite;
}

.surprise-card-front::after {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

/* Card Content Side */
.surprise-card-back {
  transform: rotateY(180deg);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: var(--sp-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--sp-md);
}

/* Category badges */
.surprise-card .card-category {
  display: inline-block;
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-category--ambiental {
  background: rgba(16, 185, 129, 0.2);
  color: var(--clr-primary-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-category--financiera {
  background: rgba(245, 158, 11, 0.2);
  color: var(--clr-accent-500);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.card-category--social {
  background: rgba(59, 130, 246, 0.2);
  color: var(--clr-social-400);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.card-category--especial {
  background: rgba(239, 68, 68, 0.2);
  color: var(--clr-danger-400);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.surprise-card .card-emoji {
  font-size: 3rem;
}

.surprise-card .card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.surprise-card .card-desc {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  line-height: 1.5;
}

/* ============================================================
   OPTION BUTTONS (.option-btn)
   ============================================================ */
.options-container {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  width: 100%;
  max-width: 500px;
}

.option-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition:
    all var(--transition-base);
  overflow: hidden;
  animation: slideIn 0.4s ease-out both;
}

.option-btn:nth-child(1) { animation-delay: 0.1s; }
.option-btn:nth-child(2) { animation-delay: 0.2s; }
.option-btn:nth-child(3) { animation-delay: 0.3s; }

.option-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateX(6px) scale(1.02);
  box-shadow: var(--shadow-md);
}

.option-btn:active {
  transform: translateX(3px) scale(0.99);
}

/* Ripple effect */
.option-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease-out, height 0.5s ease-out, opacity 0.5s ease-out;
  opacity: 0;
}

.option-btn:active::after {
  width: 600px;
  height: 600px;
  opacity: 1;
  transition: width 0s, height 0s, opacity 0s;
}

/* Effect preview tooltip */
.option-btn .option-effect {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--clr-text-dim);
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.option-btn:hover .option-effect {
  opacity: 1;
  transform: translateX(0);
}

.option-effect .effect-positive {
  color: var(--clr-primary-400);
}

.option-effect .effect-negative {
  color: var(--clr-danger-400);
}

/* ============================================================
   BUSINESS PANEL (.business-panel)
   ============================================================ */
.business-panel {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--sp-lg);
  animation: slideIn 0.5s ease-out both;
}

.business-panel h3 {
  font-size: 1.1rem;
  margin-bottom: var(--sp-md);
  color: var(--clr-text);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-sm);
}

.business-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.business-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.business-card .business-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--sp-xs);
}

.business-card .business-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-text-muted);
}

.business-card .business-income {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-accent-400);
  margin-top: var(--sp-xs);
}

.business-card.owned {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}

.partner-slot {
  background: rgba(255, 255, 255, 0.04);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--sp-md);
  text-align: center;
  color: var(--clr-text-dim);
  font-size: 0.85rem;
  margin-top: var(--sp-md);
  transition: all var(--transition-base);
}

.partner-slot:hover {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.05);
}

.partner-slot.filled {
  border-style: solid;
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.08);
  color: var(--clr-text);
}

/* ============================================================
   TURN COUNTER (.turn-counter)
   ============================================================ */
.turn-counter {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
}

.turn-counter .turn-label {
  color: var(--clr-text-muted);
  font-weight: 500;
}

.turn-counter .turn-number {
  color: var(--clr-accent-400);
  font-size: 1.1rem;
}

/* Progress ring */
.turn-counter-ring {
  position: relative;
  width: 44px;
  height: 44px;
}

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

.turn-counter-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3;
}

.turn-counter-ring .ring-progress {
  fill: none;
  stroke: var(--clr-accent-500);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4));
}

.turn-counter-ring .ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--clr-text);
}

/* ============================================================
   FLOATING PARTICLES (.particles)
   ============================================================ */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-particles);
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -20px;
  opacity: 0;
  animation: particleFloat linear infinite;
}

/* Leaf particles */
.particle--leaf {
  width: 8px;
  height: 8px;
  background: var(--clr-primary-400);
  border-radius: 0 50% 50% 50%;
  transform: rotate(45deg);
}

/* Coin particles */
.particle--coin {
  width: 6px;
  height: 6px;
  background: var(--clr-accent-400);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.3);
}

/* Varying particles */
.particle:nth-child(1)  { left: 5%;  animation-duration: 18s; animation-delay: 0s; }
.particle:nth-child(2)  { left: 15%; animation-duration: 22s; animation-delay: 2s; }
.particle:nth-child(3)  { left: 25%; animation-duration: 16s; animation-delay: 4s; }
.particle:nth-child(4)  { left: 35%; animation-duration: 24s; animation-delay: 1s; }
.particle:nth-child(5)  { left: 45%; animation-duration: 20s; animation-delay: 3s; }
.particle:nth-child(6)  { left: 55%; animation-duration: 17s; animation-delay: 5s; }
.particle:nth-child(7)  { left: 65%; animation-duration: 21s; animation-delay: 2.5s; }
.particle:nth-child(8)  { left: 75%; animation-duration: 19s; animation-delay: 1.5s; }
.particle:nth-child(9)  { left: 85%; animation-duration: 23s; animation-delay: 3.5s; }
.particle:nth-child(10) { left: 95%; animation-duration: 15s; animation-delay: 0.5s; }
.particle:nth-child(11) { left: 10%; animation-duration: 26s; animation-delay: 6s; }
.particle:nth-child(12) { left: 30%; animation-duration: 20s; animation-delay: 7s; }
.particle:nth-child(13) { left: 50%; animation-duration: 18s; animation-delay: 4.5s; }
.particle:nth-child(14) { left: 70%; animation-duration: 22s; animation-delay: 5.5s; }
.particle:nth-child(15) { left: 90%; animation-duration: 19s; animation-delay: 8s; }

/* ============================================================
   BUTTONS
   ============================================================ */

/* Primary Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-xl);
  background: linear-gradient(135deg, var(--clr-primary-500) 0%, var(--clr-primary-400) 100%);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

/* Secondary Button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-xl);
  background: transparent;
  color: var(--clr-text);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Play Button — Main CTA */
.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  padding: var(--sp-lg) var(--sp-3xl);
  background: linear-gradient(135deg, var(--clr-accent-600) 0%, var(--clr-accent-500) 50%, var(--clr-accent-400) 100%);
  background-size: 200% 200%;
  color: #000;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(245, 158, 11, 0.35),
    0 0 40px rgba(245, 158, 11, 0.15);
  transition: all var(--transition-base);
  animation:
    pulse 2.5s ease-in-out infinite,
    shimmer 4s ease-in-out infinite;
  z-index: var(--z-content);
}

.btn-play::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 40%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 60%
  );
  transform: translateX(-100%);
  animation: btnShimmer 3s ease-in-out infinite;
}

@keyframes btnShimmer {
  0%   { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

.btn-play:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow:
    0 8px 32px rgba(245, 158, 11, 0.5),
    0 0 60px rgba(245, 158, 11, 0.2);
}

.btn-play:active {
  transform: translateY(-1px) scale(1.02);
}

/* ============================================================
   SCREEN: END (.screen-end)
   ============================================================ */
.screen-end {
  justify-content: center;
  gap: var(--sp-xl);
  padding: var(--sp-xl);
  text-align: center;
}

.screen-end h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
}

.screen-end .end-emoji {
  font-size: 5rem;
  animation: bounceIn 0.8s 0.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
}

.screen-end .end-message {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  max-width: 500px;
  animation: slideUp 0.6s 0.4s ease-out both;
}

/* Stats Summary */
.end-stats {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  justify-content: center;
  animation: slideUp 0.6s 0.6s ease-out both;
}

.end-stat-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--sp-lg);
  min-width: 140px;
  transition: transform var(--transition-base);
}

.end-stat-card:hover {
  transform: translateY(-4px);
}

.end-stat-card .end-stat-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: var(--sp-xs);
}

.end-stat-card .end-stat-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
}

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

/* Victory Theme */
.screen-end.victory {
  position: relative;
}

.screen-end.victory h2 {
  background: linear-gradient(135deg, var(--clr-primary-400), var(--clr-accent-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.screen-end.victory::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(245, 158, 11, 0.1) 0%, transparent 40%);
  pointer-events: none;
}

/* Confetti pieces */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-overlay);
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  animation: confetti 4s ease-in infinite;
}

.confetti-piece:nth-child(odd)  { border-radius: 50%; }
.confetti-piece:nth-child(even) { border-radius: 2px; }

.confetti-piece:nth-child(1)  { left: 5%;  background: var(--clr-primary-400); animation-delay: 0s;    animation-duration: 3.5s; }
.confetti-piece:nth-child(2)  { left: 15%; background: var(--clr-accent-400);  animation-delay: 0.3s;  animation-duration: 4s; }
.confetti-piece:nth-child(3)  { left: 25%; background: var(--clr-social-400);  animation-delay: 0.6s;  animation-duration: 3.8s; }
.confetti-piece:nth-child(4)  { left: 35%; background: var(--clr-danger-400);  animation-delay: 0.9s;  animation-duration: 4.2s; }
.confetti-piece:nth-child(5)  { left: 45%; background: var(--clr-primary-400); animation-delay: 1.2s;  animation-duration: 3.6s; }
.confetti-piece:nth-child(6)  { left: 55%; background: var(--clr-accent-400);  animation-delay: 0.4s;  animation-duration: 4.1s; }
.confetti-piece:nth-child(7)  { left: 65%; background: var(--clr-social-400);  animation-delay: 0.7s;  animation-duration: 3.9s; }
.confetti-piece:nth-child(8)  { left: 75%; background: var(--clr-danger-400);  animation-delay: 1s;    animation-duration: 3.7s; }
.confetti-piece:nth-child(9)  { left: 85%; background: var(--clr-primary-400); animation-delay: 0.2s;  animation-duration: 4.3s; }
.confetti-piece:nth-child(10) { left: 95%; background: var(--clr-accent-400);  animation-delay: 0.5s;  animation-duration: 3.4s; }
.confetti-piece:nth-child(11) { left: 10%; background: #c084fc;               animation-delay: 1.1s;  animation-duration: 4s; }
.confetti-piece:nth-child(12) { left: 40%; background: #fb923c;               animation-delay: 0.8s;  animation-duration: 3.6s; }
.confetti-piece:nth-child(13) { left: 60%; background: #38bdf8;               animation-delay: 1.3s;  animation-duration: 4.2s; }
.confetti-piece:nth-child(14) { left: 80%; background: #a3e635;               animation-delay: 0.1s;  animation-duration: 3.8s; }
.confetti-piece:nth-child(15) { left: 20%; background: #f472b6;               animation-delay: 1.5s;  animation-duration: 4.4s; }

/* Defeat Theme */
.screen-end.defeat {
  filter: saturate(0.5) brightness(0.85);
}

.screen-end.defeat h2 {
  color: var(--clr-text-muted);
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

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

/* slideUp */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* slideIn (from left) */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* pulse */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

/* glow */
@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }
  50%      { box-shadow: 0 0 24px rgba(245, 158, 11, 0.5), 0 0 48px rgba(245, 158, 11, 0.15); }
}

/* float */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* spin */
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* cardFlip — 3D Y-axis */
@keyframes cardFlip {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(180deg); }
}

/* confetti */
@keyframes confetti {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(25vh) rotate(180deg) translateX(20px) scale(0.9);
  }
  50% {
    transform: translateY(50vh) rotate(360deg) translateX(-15px) scale(1.1);
  }
  75% {
    transform: translateY(75vh) rotate(540deg) translateX(10px) scale(0.85);
  }
  100% {
    opacity: 0;
    transform: translateY(105vh) rotate(720deg) translateX(-5px) scale(0.6);
  }
}

/* particleFloat */
@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) translateX(40px) rotate(360deg);
  }
}

/* houseTransform */
@keyframes houseTransform {
  0%   { transform: scale(1); filter: brightness(1); }
  30%  { transform: scale(1.03); filter: brightness(1.15); }
  60%  { transform: scale(0.99); filter: brightness(1.05); }
  100% { transform: scale(1); filter: brightness(1); }
}

.house.transforming {
  animation: houseTransform 1.5s ease-in-out;
}

/* shimmer */
@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* bounceIn */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%      { transform: translateX(-8px) rotate(-1deg); }
  20%      { transform: translateX(7px) rotate(1deg); }
  30%      { transform: translateX(-6px) rotate(-0.5deg); }
  40%      { transform: translateX(5px) rotate(0.5deg); }
  50%      { transform: translateX(-4px); }
  60%      { transform: translateX(3px); }
  70%      { transform: translateX(-2px); }
  80%      { transform: translateX(1px); }
}

/* ============================================================
   MODAL / OVERLAY
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--sp-2xl);
  max-width: 500px;
  width: 90%;
  animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
}

.modal h3 {
  font-size: 1.4rem;
  margin-bottom: var(--sp-md);
}

.modal p {
  color: var(--clr-text-muted);
  margin-bottom: var(--sp-lg);
}

/* ============================================================
   TOOLTIP
   ============================================================ */
.tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: var(--sp-xs) var(--sp-sm);
  font-size: 0.8rem;
  color: var(--clr-text);
  pointer-events: none;
  z-index: var(--z-tooltip);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: all var(--transition-fast);
}

.tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   NOTIFICATION TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  top: var(--sp-lg);
  right: var(--sp-lg);
  z-index: var(--z-tooltip);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.toast {
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: var(--sp-md) var(--sp-lg);
  color: var(--clr-text);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  animation: slideIn 0.4s ease-out both;
  box-shadow: var(--shadow-lg);
  max-width: 350px;
}

.toast--success {
  border-left: 3px solid var(--clr-primary-400);
}

.toast--warning {
  border-left: 3px solid var(--clr-accent-500);
}

.toast--error {
  border-left: 3px solid var(--clr-danger-500);
}

.toast--info {
  border-left: 3px solid var(--clr-social-500);
}

.toast.exit {
  animation: toastExit 0.3s ease-in forwards;
}

@keyframes toastExit {
  to {
    opacity: 0;
    transform: translateX(120%);
  }
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .game-main {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .stat {
    min-width: auto;
  }

  .character-grid {
    flex-direction: column;
    align-items: center;
  }

  .character-card {
    width: 100%;
    max-width: 300px;
  }

  .business-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .screen {
    padding: var(--sp-md);
  }

  .screen-intro .logo h1 {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .stats-bar {
    padding: var(--sp-sm);
    gap: var(--sp-sm);
    border-radius: var(--radius-md);
  }

  .stat {
    padding: var(--sp-xs) var(--sp-sm);
    gap: var(--sp-xs);
  }

  .stat .stat-emoji {
    font-size: 1.2rem;
  }

  .stat .stat-value {
    font-size: 1.1rem;
  }

  .house-container {
    min-height: 280px;
    transform: scale(0.85);
    transform-origin: bottom center;
  }

  .surprise-card {
    width: 240px;
    height: 320px;
  }

  .option-btn {
    padding: var(--sp-sm) var(--sp-md);
    font-size: 0.85rem;
  }

  .btn-play {
    padding: var(--sp-md) var(--sp-2xl);
    font-size: 1.1rem;
  }

  .end-stats {
    flex-direction: column;
    align-items: center;
  }

  .end-stat-card {
    width: 100%;
    max-width: 280px;
  }

  .business-grid {
    grid-template-columns: 1fr;
  }

  .toast-container {
    left: var(--sp-md);
    right: var(--sp-md);
  }

  .toast {
    max-width: 100%;
  }
}

/* Small mobile */
@media (max-width: 400px) {
  html {
    font-size: 13px;
  }

  .house-container {
    transform: scale(0.7);
  }

  .character-card {
    padding: var(--sp-md);
  }

  .character-card .character-emoji {
    font-size: 3rem;
  }
}

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

  .particles {
    display: none;
  }

  .confetti-container {
    display: none;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }

.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }

.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Fade utilities for JS toggling */
.fade-enter {
  opacity: 0;
  transform: translateY(10px);
}

.fade-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.fade-exit {
  opacity: 1;
}

.fade-exit-active {
  opacity: 0;
  transition: opacity var(--transition-fast);
}
