:root {
  --bg-1: #121617;
  --bg-2: #080c0d;
  --line: rgba(235, 251, 243, 0.3);
  --text: #eef9f5;
  --muted: #b2d5c8;
  --gold: #e9c26d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Barlow", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 12%, #2c3e40 0%, transparent 28%),
    radial-gradient(circle at 82% 6%, #2b3539 0%, transparent 24%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2));
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .06;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 4px 4px;
}

.platform {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 14px 24px;
}

.card {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(15, 57, 46, 0.86), rgba(7, 25, 20, 0.92));
  box-shadow: 0 14px 26px rgba(0,0,0,.3);
}

.brand-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

h1 {
  margin: 6px 0 0;
  font-family: "Oswald", sans-serif;
  font-size: clamp(40px, 6vw, 66px);
  line-height: .9;
  letter-spacing: .04em;
}

.btn {
  min-height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(240,255,248,.22);
  padding: 0 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn.primary { background: linear-gradient(145deg, #ffe7ad, var(--gold)); color: #1f1608; }
.btn.ghost { background: rgba(0,0,0,.25); color: #eef9f5; }

.head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
}

.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.retro-board {
  margin-top: 10px;
  border: 1px solid rgba(210, 236, 222, 0.22);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(40, 56, 46, 0.9), rgba(18, 27, 23, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 10px 18px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.retro-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: linear-gradient(180deg, rgba(120, 142, 107, 0.55), rgba(66, 86, 72, 0.75));
  border-bottom: 1px solid rgba(220, 243, 230, 0.16);
  font-size: 12px;
  color: #e7f4ec;
  letter-spacing: 0.05em;
}

.retro-nav {
  display: flex;
  gap: 6px;
  padding: 6px 8px 0;
}

.retro-tab {
  min-height: 24px;
  border: 1px solid rgba(209, 235, 223, 0.24);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, rgba(90, 110, 95, 0.78), rgba(55, 70, 60, 0.88));
  color: #d9ebe1;
  font-size: 11px;
  font-weight: 700;
  padding: 0 8px;
}

.retro-tab.active {
  background: linear-gradient(180deg, rgba(153, 181, 161, 0.62), rgba(83, 109, 93, 0.9));
  color: #fff6d7;
}

.retro-marquee {
  padding: 7px 10px;
  border-bottom: 1px dashed rgba(233, 251, 241, 0.2);
  background: rgba(12, 20, 17, 0.92);
  overflow: hidden;
}

.retro-marquee p {
  margin: 0;
  white-space: nowrap;
  color: #d8ebe2;
  font-size: 12px;
  animation: marquee 16s linear infinite;
}

.retro-notes {
  padding: 8px 10px;
  display: grid;
  gap: 5px;
  background: rgba(13, 22, 18, 0.95);
}

.retro-notes div {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(220, 243, 230, 0.14);
  border-radius: 6px;
  padding: 5px 6px;
  background: rgba(255, 255, 255, 0.02);
}

.retro-notes span {
  font-size: 11px;
  color: #f0dca4;
  letter-spacing: 0.04em;
}

.retro-notes b {
  font-size: 12px;
  color: #d6ebe0;
  font-weight: 600;
}

.retro-actions {
  padding: 8px 10px 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(220, 243, 230, 0.14);
  background: rgba(13, 22, 18, 0.95);
}

.landing-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  grid-template-areas:
    "hero auth"
    "winners events";
  gap: 10px;
}

.hero { grid-area: hero; padding: 14px; }
.hero h2 { margin: 0; font-family: "Oswald", sans-serif; font-size: 42px; line-height: .9; }
.hero p { color: #d7eee5; max-width: 52ch; }
.hero-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.hero-kpis div { border: 1px solid rgba(240,255,248,.2); border-radius: 10px; background: rgba(0,0,0,.2); padding: 8px; }
.hero-kpis span { display: block; font-size: 12px; color: var(--muted); }
.hero-kpis strong { font-size: 22px; }
.hero-cta { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }

.auth { grid-area: auth; padding: 12px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.tab { min-height: 32px; border: 1px solid rgba(240,255,248,.2); border-radius: 8px; background: rgba(0,0,0,.2); color: var(--text); font-weight: 700; cursor: pointer; }
.tab.active { border-color: rgba(255,214,121,.7); background: rgba(255,214,121,.14); color: #fff2c8; }
.auth-form { display: grid; gap: 8px; }
.auth-form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.auth-form input { height: 38px; border: 1px solid rgba(240,255,248,.2); border-radius: 8px; background: rgba(0,0,0,.24); color: var(--text); padding: 0 8px; }
.auth-foot { margin-top: 8px; color: var(--muted); font-size: 12px; }
.hidden { display: none; }

.news h3,
.events h3,
.winners h3,
.feed h3,
.side-block h3 {
  margin: 0 0 8px;
  font-family: "Oswald", sans-serif;
  letter-spacing: .04em;
  font-size: 28px;
}

.events { grid-area: events; padding: 12px; }
.event-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; border: 1px solid rgba(240,255,248,.2); border-radius: 9px; padding: 7px 8px; margin-bottom: 6px; background: rgba(0,0,0,.2); }
.event-row span { color: var(--muted); font-size: 12px; }
.event-row em { font-style: normal; color: #fff3c9; font-size: 12px; }

.winners { grid-area: winners; padding: 12px; }
.winner { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; border: 1px solid rgba(240,255,248,.2); border-radius: 9px; padding: 7px 8px; margin-bottom: 6px; background: rgba(0,0,0,.2); }
.winner span { color: var(--muted); font-size: 12px; }
.winner em { color: #96ffc8; font-style: normal; font-weight: 700; }

.lobby-top {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
}

.top-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.top-stats div {
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 10px;
  background: rgba(0,0,0,.24);
  padding: 8px 10px;
  min-width: 110px;
}

.top-stats span { display: block; font-size: 12px; color: var(--muted); }
.top-stats strong { font-size: 18px; }

.lobby-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 10px;
}

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

.game-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(15, 57, 46, 0.86), rgba(7, 25, 20, 0.92));
  padding: 12px;
  display: grid;
  gap: 8px;
}

.game-card .tag { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.game-card h2 { margin: 0; font-family: "Oswald", sans-serif; font-size: 34px; line-height: .9; }
.game-card p { margin: 0; color: #d7eee5; font-size: 13px; }
.meta-row { display: flex; justify-content: space-between; font-size: 12px; color: #c6e3d7; }

.feed {
  margin-top: 10px;
  padding: 12px;
}

.feed-list {
  display: grid;
  gap: 5px;
}

.feed-list p {
  margin: 0;
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(0,0,0,.2);
  font-size: 13px;
}

.feed-list em { color: #96ffc8; font-style: normal; }

.side-col {
  display: grid;
  gap: 10px;
}

.side-block {
  padding: 12px;
}

.panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.panel-tab {
  min-height: 30px;
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.panel-tab.active {
  border-color: rgba(255,214,121,.7);
  background: rgba(255,214,121,.14);
  color: #fff2c8;
}

.task,
.rank {
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
  padding: 7px 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

.rank.me { border-color: rgba(255,214,121,.7); background: rgba(255,214,121,.12); }

.bullet {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
  color: #d7eee5;
  font-size: 13px;
}

.global-chat {
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.2);
  padding: 7px 8px;
  display: grid;
  gap: 4px;
  min-height: 96px;
}

.global-chat p {
  margin: 0;
  font-size: 12px;
  line-height: 1.25;
  color: #d7eee5;
}

.global-chat-input {
  margin-top: 7px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
}

.global-chat-input input {
  height: 34px;
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
  color: var(--text);
  padding: 0 8px;
}

.global-chat-input button {
  height: 34px;
  border: 1px solid rgba(240,255,248,.3);
  border-radius: 8px;
  background: rgba(255,214,121,.18);
  color: #fff2c8;
  font-weight: 700;
}

.profile-form {
  display: grid;
  gap: 8px;
}

.profile-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.profile-form input,
.profile-form select {
  height: 34px;
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
  color: var(--text);
  padding: 0 8px;
}

.platform-footer {
  margin-top: 16px;
  padding-bottom: 12px;
}

.footer-inner {
  border: 1px solid rgba(235, 251, 243, 0.26);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(107, 126, 79, 0.24), rgba(21, 30, 20, 0.72)),
    linear-gradient(120deg, rgba(17, 52, 42, 0.65), rgba(7, 20, 17, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 10px 18px rgba(0, 0, 0, 0.25);
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
}

.footer-alert b {
  display: block;
  font-family: "Oswald", sans-serif;
  letter-spacing: .04em;
  color: #fff2c8;
  font-size: 16px;
  margin-bottom: 2px;
}

.footer-alert p {
  margin: 0;
  font-size: 12px;
  color: #d4e7df;
  line-height: 1.35;
}

.footer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  color: #f0f8f4;
  text-decoration: none;
  font-size: 12px;
  border: 1px solid rgba(240,255,248,.24);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(0,0,0,.2);
}

.footer-links a:hover {
  color: #fff2c8;
  border-color: rgba(255,214,121,.74);
  background: rgba(255,214,121,.16);
}

.compliance-wrap {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.compliance-card {
  padding: 14px;
}

.compliance-card h2 {
  margin: 0 0 8px;
  font-family: "Oswald", sans-serif;
  font-size: 30px;
  letter-spacing: .04em;
}

.compliance-card p {
  margin: 0 0 8px;
  color: #d7eee5;
  font-size: 14px;
  line-height: 1.4;
}

.compliance-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: #d7eee5;
}

.compliance-list a {
  color: #fff2c8;
}

.note-box {
  border: 1px solid rgba(255,214,121,.45);
  border-radius: 10px;
  background: rgba(255,214,121,.1);
  padding: 8px 10px;
  font-size: 13px;
  color: #fff2c8;
}

.rules-shell {
  padding: 10px;
}

.rules-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.rules-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid rgba(240,255,248,.24);
  border-radius: 999px;
  background: rgba(0,0,0,.2);
  color: #d7eee5;
  font-size: 12px;
  font-weight: 700;
  padding: 0 12px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.rules-tab.active {
  color: #fff2c8;
  border-color: rgba(255,214,121,.76);
  background: rgba(255,214,121,.16);
}

.rules-panel {
  display: none;
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 12px;
  background: rgba(0,0,0,.2);
  padding: 12px;
}

.rules-panel.active {
  display: block;
}

.rules-panel h3 {
  margin: 0 0 8px;
  font-family: "Oswald", sans-serif;
  font-size: 30px;
  line-height: .95;
}

.rules-panel p {
  margin: 0 0 8px;
  color: #d7eee5;
  line-height: 1.45;
}

.rules-panel h4 {
  margin: 12px 0 8px;
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  letter-spacing: .03em;
  color: #fff2c8;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 10px;
  font-size: 13px;
  color: #d7eee5;
}

.rules-table th,
.rules-table td {
  border: 1px solid rgba(240,255,248,.2);
  padding: 6px 7px;
  text-align: left;
  vertical-align: top;
}

.rules-table th {
  background: rgba(255,214,121,.12);
  color: #fff2c8;
  font-weight: 700;
}

.card-code {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 52px;
  border: 1px solid rgba(240,255,248,.28);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(228, 238, 234, .92));
  color: #15211d;
  font-weight: 700;
  margin-right: 5px;
  margin-bottom: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,.28);
  vertical-align: middle;
}

.card-code .card-rank {
  position: absolute;
  top: 4px;
  left: 5px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.card-code .card-suit {
  position: absolute;
  right: 5px;
  bottom: 4px;
  font-size: 14px;
  line-height: 1;
}

.card-code .card-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 17px;
  line-height: 1;
}

.card-code.red {
  color: #b3122f;
}

.card-code.black {
  color: #151f1c;
}

.strategy-text {
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 10px;
  background: rgba(0,0,0,.16);
  padding: 10px;
}

.leaderboard-shell {
  display: grid;
  gap: 10px;
}

.leaderboard-card {
  padding: 12px;
}

.leaderboard-note {
  margin: 0;
  color: #d7eee5;
  font-size: 13px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 13px;
}

.leaderboard-table th,
.leaderboard-table td {
  border: 1px solid rgba(240,255,248,.2);
  padding: 7px 8px;
  text-align: left;
}

.leaderboard-table th {
  background: rgba(255,214,121,.12);
  color: #fff2c8;
}

.leaderboard-table td strong {
  color: #fff2c8;
}

.leaderboard-tabs .rules-tab {
  text-decoration: none;
}

.leaderboard-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 10px;
}

.lb-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(240,255,248,.3);
  object-fit: cover;
  background: rgba(0,0,0,.2);
}

.leaderboard-row-me {
  background: rgba(255,214,121,.12);
}

.leaderboard-row-me td {
  border-color: rgba(255,214,121,.52);
}

.leaderboard-row-me strong {
  color: #fff2c8;
}

.pagination {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  min-height: 28px;
  border: 1px solid rgba(240,255,248,.25);
  border-radius: 7px;
  padding: 0 9px;
  background: rgba(0,0,0,.2);
  color: #e5f2ec;
  font-size: 12px;
  font-weight: 700;
}

.page-btn.active {
  border-color: rgba(255,214,121,.8);
  background: rgba(255,214,121,.18);
  color: #fff2c8;
}

.leaderboard-side {
  display: grid;
  gap: 10px;
}

.leaderboard-side .task {
  margin-bottom: 0;
}

.filter-controls {
  display: grid;
  gap: 8px;
}

.filter-controls label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.filter-controls select,
.filter-controls input {
  height: 34px;
  border: 1px solid rgba(240,255,248,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
  color: var(--text);
  padding: 0 8px;
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: in .45s ease forwards;
}

.delay-1 { animation-delay: .08s; }

@keyframes in { to { opacity: 1; transform: translateY(0); } }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-52%); }
}

@media (max-width: 1060px) {
  .landing-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "auth"
      "events"
      "winners";
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .rules-panel h3 {
    font-size: 26px;
  }

  .rules-panel h4 {
    font-size: 20px;
  }

  .rules-table {
    font-size: 12px;
  }

  .leaderboard-layout {
    grid-template-columns: 1fr;
  }
}
