
:root {
  --bg-1: #130716;
  --bg-2: #3d110c;
  --bg-3: #ff9f1c;
  --accent: #ffd166;
  --accent-2: #ff4d6d;
  --accent-3: #4cc9f0;
  --glass: rgba(255, 255, 255, 0.11);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --border: rgba(255, 255, 255, 0.22);
  --text: #fff7e8;
  --muted: rgba(255, 247, 232, 0.72);
  --dark: #190d12;
  --success: #62f2a0;
  --danger: #ff4d6d;
  --shadow: 0 28px 80px rgba(0, 0, 0, .45);
}

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

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 77, 109, .36), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(76, 201, 240, .30), transparent 26%),
    radial-gradient(circle at 50% 88%, rgba(255, 209, 102, .30), transparent 32%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2) 48%, #1b0f08 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -2;
  width: 420px;
  height: 420px;
  filter: blur(28px);
  opacity: .55;
  border-radius: 50%;
  animation: floatBlob 11s ease-in-out infinite alternate;
}

body::before {
  top: -130px;
  left: -120px;
  background: linear-gradient(135deg, #ff4d6d, #ffbe0b);
}

body::after {
  right: -130px;
  bottom: -130px;
  background: linear-gradient(135deg, #4cc9f0, #b5179e);
  animation-delay: -4s;
}

@keyframes floatBlob {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(44px, 34px, 0) scale(1.08); }
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 25%, transparent 82%);
}

.page {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr);
  gap: 28px;
  align-items: center;
}

.panel {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, rgba(255,255,255,.28), transparent 30%);
}

.hero-copy {
  padding: clamp(26px, 5vw, 58px);
}

.logo {
  width: min(360px, 86vw);
  height: auto;
  filter: drop-shadow(0 16px 38px rgba(0,0,0,.42));
  animation: logoPulse 3.2s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1) rotate(-1deg); }
  50% { transform: scale(1.035) rotate(1deg); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(42px, 7vw, 90px);
  letter-spacing: -0.07em;
  line-height: .9;
  margin: 16px 0;
  text-shadow: 0 18px 60px rgba(0,0,0,.45);
}

.lead {
  max-width: 670px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.65;
  margin: 0 0 28px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.btn {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 15px 20px;
  min-height: 54px;
  background: rgba(255,255,255,.12);
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.36);
  box-shadow: 0 16px 36px rgba(0,0,0,.26);
}

.btn.primary {
  color: #211006;
  border: 0;
  background: linear-gradient(135deg, var(--accent), #ff8c42 55%, #ff4d6d);
  box-shadow: 0 18px 50px rgba(255, 77, 109, .30);
}

.btn.full { width: 100%; }

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.lang-btn {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease;
}

.lang-btn:hover,
.lang-btn.active {
  transform: translateY(-2px);
  background: rgba(255,255,255,.20);
}

.lang-btn img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.preview-stack {
  padding: 26px;
  min-height: 530px;
  display: grid;
  place-items: center;
}

.preview-card {
  width: min(380px, 82vw);
  aspect-ratio: 3/4.25;
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,232,187,.94)),
    radial-gradient(circle at 20% 15%, rgba(255,77,109,.28), transparent 30%);
  color: var(--dark);
  box-shadow: 0 34px 70px rgba(0,0,0,.45);
  padding: 28px;
  position: relative;
  transform: rotate(3deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.preview-card::before,
.play-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  border: 1px solid rgba(25,13,18,.12);
  pointer-events: none;
}

.preview-card .mini-logo {
  width: 116px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.2));
}

.preview-card h2 {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -.05em;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.badge.dark {
  color: rgba(25,13,18,.72);
  background: rgba(25,13,18,.08);
  border-color: rgba(25,13,18,.08);
}

.game-layout {
  width: min(1180px, calc(100% - 26px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
  gap: 22px;
  padding: 26px 0;
  align-items: center;
}

.sidebar,
.game-stage,
.rules-card {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255,255,255,.15), rgba(255,255,255,.07));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 30px;
}

.sidebar {
  padding: 20px;
  align-self: stretch;
}

.sidebar-logo {
  width: 184px;
  display: block;
  margin: 4px auto 18px;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,.35));
}

.control-section {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.12);
}

.control-section:first-of-type { border-top: 0; }

.control-section h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 12px;
}

.input,
.select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.16);
  outline: 0;
  background: rgba(0,0,0,.18);
  color: var(--text);
  border-radius: 18px;
  padding: 13px 14px;
  font-size: 15px;
}

.input::placeholder { color: rgba(255,247,232,.46); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 11px;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.chip:hover,
.chip.active {
  transform: translateY(-2px);
  background: rgba(255, 209, 102, .24);
  border-color: rgba(255, 209, 102, .54);
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.switch {
  position: relative;
  width: 58px;
  height: 32px;
  flex: 0 0 auto;
}

.switch input { display: none; }

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.16);
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 3px;
  left: 4px;
  background: white;
  border-radius: 50%;
  transition: transform .22s ease;
  box-shadow: 0 8px 18px rgba(0,0,0,.3);
}

.switch input:checked + .slider {
  background: linear-gradient(135deg, #ff4d6d, #ffb703);
}

.switch input:checked + .slider::before { transform: translateX(25px); }

.game-stage {
  min-height: min(820px, calc(100vh - 52px));
  padding: clamp(18px, 4vw, 38px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  overflow: hidden;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.status-line {
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
}

.card-zone {
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.play-card {
  width: min(475px, 86vw);
  min-height: min(610px, 70vh);
  border-radius: 34px;
  color: var(--dark);
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,.95), transparent 24%),
    linear-gradient(150deg, #fff9ed, #ffdca2 48%, #ff9b6a 100%);
  box-shadow: 0 35px 95px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.8);
  padding: clamp(25px, 5vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transform-style: preserve-3d;
  transition: transform .54s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
}

.play-card.flipping {
  transform: rotateY(90deg) scale(.94);
  opacity: .55;
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(25,13,18,.08);
  color: rgba(25,13,18,.72);
  font-weight: 1000;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.counter-pill {
  font-weight: 1000;
  color: rgba(25,13,18,.46);
}

.card-text {
  position: relative;
  z-index: 2;
  font-size: clamp(27px, 4.5vw, 43px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 1000;
  margin: 36px 0;
  text-wrap: balance;
}

.card-answer {
  position: relative;
  z-index: 2;
  display: none;
  margin-top: 12px;
  border-radius: 20px;
  background: rgba(25,13,18,.08);
  padding: 15px;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(25,13,18,.78);
  font-weight: 800;
}

.card-answer.show { display: block; }

.card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: rgba(25,13,18,.58);
  font-weight: 900;
}

.icon-beer {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.22));
}

.actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.actions .btn { min-height: 52px; padding-inline: 12px; }

.small-note {
  color: rgba(255,247,232,.56);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 2, 5, .72);
  backdrop-filter: blur(12px);
}

.modal-backdrop.show { display: flex; }

.modal {
  width: min(520px, 100%);
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(43,20,24,.98), rgba(23,10,15,.96));
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.modal h2 {
  font-size: 31px;
  margin-bottom: 10px;
  letter-spacing: -.04em;
}

.modal p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.rules-page {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px 0;
}

.rules-card {
  padding: clamp(24px, 4vw, 44px);
}

.rules-card h1 {
  margin-bottom: 18px;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.rule-item {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  padding: 18px;
}

.rule-item h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.rule-item p {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .hero,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .game-layout {
    align-items: stretch;
  }

  .sidebar {
    align-self: auto;
  }

  .preview-stack {
    min-height: auto;
  }

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

  .actions .btn.primary {
    grid-column: 1 / -1;
    order: -1;
  }

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

@media (max-width: 560px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  .play-card {
    min-height: 520px;
  }

  .card-text {
    font-size: 30px;
  }
}
