@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  --background: #F7F9FC;
  --surface: #FFFFFF;
  --primary: #2563EB;
  --secondary: #EC4899;
  --accent: #14B8A6;
  --dark-text: #0F172A;
  --muted-text: #475569;
  --line: #D8E1EE;
  --line-soft: #E9EEF5;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --secondary-soft: rgba(236, 72, 153, 0.12);
  --accent-soft: rgba(20, 184, 166, 0.14);
  --shadow-card: 0 14px 40px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 70px rgba(37, 99, 235, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-heading: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--dark-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a:hover {
  color: var(--secondary);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-shell {
  padding: 56px 0 80px;
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 40px;
}

.page-card h1,
.page-card h2,
.page-card h3 {
  font-family: var(--font-heading);
  letter-spacing: 0.4px;
  color: var(--dark-text);
}

.page-card h1 {
  font-size: clamp(34px, 5vw, 52px);
  margin-bottom: 14px;
}

.page-card h2 {
  margin-top: 28px;
  font-size: 30px;
  margin-bottom: 10px;
}

.page-card p,
.page-card li,
.page-card label,
.page-card input,
.page-card textarea {
  color: var(--muted-text);
}

.page-card ul {
  padding-left: 22px;
  margin-top: 10px;
}

/* Age Gate */
.age-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.35s ease;
}

.age-gate-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: linear-gradient(160deg, #ffffff 0%, #eff6ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-xl);
  padding: 46px 38px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.24);
  overflow: hidden;
  animation: slideUp 0.45s ease 0.12s both;
}

.age-gate-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.age-gate-glow {
  position: absolute;
  top: -120px;
  right: -90px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.18), transparent 70%);
  pointer-events: none;
}

.age-gate-content {
  position: relative;
  text-align: center;
}

.age-gate-title {
  font-family: var(--font-heading);
  font-size: 38px;
  line-height: 1;
  margin-bottom: 12px;
}

.age-gate-text {
  font-size: 18px;
  color: var(--muted-text);
  margin-bottom: 10px;
}

.age-gate-disclaimer {
  font-size: 13px;
  color: var(--muted-text);
  line-height: 1.75;
  margin-bottom: 26px;
}

.age-gate-btn,
.btn-register,
.btn-play,
.btn-submit,
.btn-auth,
.btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 13px 22px;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: var(--transition);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.age-gate-btn,
.btn-submit,
.btn-auth {
  width: 100%;
}

.age-gate-btn:hover,
.btn-register:hover,
.btn-play:hover,
.btn-submit:hover,
.btn-auth:hover,
.btn-inline:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.btn-login {
  color: var(--primary) !important;
  border: 1.5px solid rgba(37, 99, 235, 0.26);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  background: rgba(255, 255, 255, 0.84);
}

.btn-login:hover {
  border-color: var(--secondary);
  background: rgba(236, 72, 153, 0.08);
  color: var(--secondary) !important;
}

/* Header */
#site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 29px;
  font-weight: 700;
  color: var(--dark-text);
  letter-spacing: 0.5px;
}

.logo-text span {
  color: var(--secondary);
}

#main-nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

#main-nav ul li a {
  color: var(--muted-text);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#main-nav ul li a:hover,
#main-nav ul li.current-menu-item a {
  color: var(--primary);
  background: var(--primary-soft);
}

.header-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: transparent;
  border: none;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--surface);
  z-index: 999;
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.16);
  padding: 24px;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.mobile-menu-close button {
  border: none;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-nav a {
  color: var(--dark-text);
  font-weight: 600;
}

.mobile-auth {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

/* Hero */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 88px 20px 76px;
  text-align: center;
  background:
    radial-gradient(circle at 10% 20%, rgba(20, 184, 166, 0.12), transparent 22%),
    radial-gradient(circle at 82% 14%, rgba(236, 72, 153, 0.12), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7f9fc 68%, #eef4ff 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 820px;
  height: 820px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 68%);
  pointer-events: none;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 24px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 20px;
  color: var(--dark-text);
}

.hero-title span {
  color: var(--primary);
  display: block;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--muted-text);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.72;
}

.hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

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

.feature-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--dark-text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.feature-card p {
  font-size: 14px;
  color: var(--muted-text);
  line-height: 1.68;
}

/* Sections */
.games-section,
.howto-section {
  padding: 82px 20px;
}

.games-section {
  background: linear-gradient(180deg, #eff6ff 0%, #f7f9fc 100%);
}

.howto-section {
  background: var(--background);
}

.leaderboard-section {
  padding: 82px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.trust-section {
  padding: 24px 20px 0;
  background: var(--background);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-label {
  display: inline-block;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  color: var(--dark-text);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.section-title span {
  color: var(--primary);
}

/* Game card */
.games-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  max-width: 640px;
  margin: 0 auto;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-card);
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.game-thumbnail {
  width: 100%;
  height: 260px;
  overflow: hidden;
  position: relative;
}

.game-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}

.game-thumbnail-placeholder.reel-bloom {
  background:
    radial-gradient(circle at 20% 18%, rgba(20, 184, 166, 0.35), transparent 20%),
    radial-gradient(circle at 80% 12%, rgba(236, 72, 153, 0.28), transparent 22%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #0f766e 100%);
  color: #ffffff;
  text-shadow: 0 10px 28px rgba(15, 23, 42, 0.5);
}

.game-thumbnail-placeholder small {
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.88;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.46));
  opacity: 0;
  justify-content: center !important;
  transition: var(--transition);
}

.game-card:hover .game-overlay {
  opacity: 1;
}

.btn-play {
  padding: 13px 24px;
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
}

.game-title-wrap {
  display: grid;
  gap: 6px;
}

.game-title {
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: 0.4px;
  color: var(--dark-text);
}

.game-meta {
  color: var(--muted-text);
  font-size: 14px;
}

/* Leaderboard */
.leaderboard-wrapper {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.leaderboard-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(236, 72, 153, 0.06));
}

.trophy-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(236, 72, 153, 0.1);
}

.leaderboard-header h3 {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--dark-text);
  letter-spacing: 0.4px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
  text-align: left;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-soft);
}

.leaderboard-table th {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted-text);
  background: rgba(248, 250, 252, 0.88);
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: none;
}

.player-name,
.score-value {
  color: var(--dark-text);
  font-weight: 700;
}

.activity-text {
  color: var(--muted-text);
}

.time-highlight {
  color: var(--primary);
  font-weight: 600;
}

.rank-badge {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
}

/* How-to */
.howto-wrapper {
  max-width: 840px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 38px 34px;
}

.howto-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 184, 166, 0.1);
  color: var(--accent);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 24px;
}

.howto-step + .howto-step {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 1;
  color: var(--dark-text);
  margin-bottom: 10px;
}

.howto-step p {
  color: var(--muted-text);
  font-size: 15px;
  line-height: 1.75;
}

/* Trust */
.trust-inner {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.trust-badge {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-card);
}

.trust-badge > span {
  font-size: 12px !important;
  color: var(--muted-text) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge-19plus,
.badge-nz,
.badge-points {
  min-width: 74px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #fff;
}

.badge-19plus {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  font-size: 26px;
}

.badge-nz {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  font-size: 14px;
  text-transform: uppercase;
}

.badge-points {
  background: linear-gradient(135deg, var(--accent), #0f766e);
  font-size: 14px;
  text-transform: uppercase;
}

/* Footer */
#site-footer {
  padding: 70px 20px 34px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border-top: 1px solid rgba(37, 99, 235, 0.1);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr) minmax(0, 0.7fr);
  gap: 34px;
  margin-bottom: 34px;
}

.footer-brand p,
.footer-col li a,
.footer-bottom p,
.footer-disclaimer {
  color: var(--muted-text);
}

.footer-brand p {
  max-width: 420px;
  line-height: 1.78;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--dark-text);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-disclaimer {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.75;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group input,
.field-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: var(--transition);
}

.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.field-group textarea {
  min-height: 150px;
  resize: vertical;
}

.alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.alert-success {
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
}

.alert-error {
  background: rgba(236, 72, 153, 0.12);
  color: #9d174d;
}

.page-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-top: 24px;
}

.info-panel {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(20, 184, 166, 0.08));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.info-panel h3 {
  font-family: var(--font-heading);
  font-size: 26px;
  margin-bottom: 10px;
}

.info-panel p,
.info-panel li {
  color: var(--muted-text);
}

.info-panel ul {
  margin-top: 12px;
  padding-left: 20px;
}

/* Game Modal */
.game-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

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

.game-modal-card {
  width: min(1100px, 100%);
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 26px 90px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.game-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(236, 72, 153, 0.08));
  border-bottom: 1px solid var(--line-soft);
}

.game-modal-title {
  display: grid;
  gap: 4px;
}

.game-modal-title strong {
  font-family: var(--font-heading);
  font-size: 28px;
  letter-spacing: 0.5px;
}

.game-modal-title span {
  color: var(--muted-text);
  font-size: 14px;
}

.game-modal-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  cursor: pointer;
  font-size: 24px;
}

.game-frame-wrap {
  aspect-ratio: 16/9;
  background: #fff;
}

.game-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Utilities */
.text-accent {
  color: var(--accent);
}

.muted {
  color: var(--muted-text);
}

.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;
}

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

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  #main-nav, .header-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-features,
  .trust-inner,
  .footer-top,
  .page-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand p {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .leaderboard-table,
  .leaderboard-table thead,
  .leaderboard-table tbody,
  .leaderboard-table th,
  .leaderboard-table td,
  .leaderboard-table tr {
    display: block;
  }

  .leaderboard-table thead {
    display: none;
  }

  .leaderboard-table tr {
    padding: 16px;
    border-bottom: 1px solid var(--line-soft);
  }

  .leaderboard-table td {
    padding: 6px 0;
    border: none;
  }

  .leaderboard-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--muted-text);
    margin-bottom: 2px;
  }

  .footer-bottom,
  .game-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-card,
  .howto-wrapper {
    padding: 28px 22px;
  }

  .age-gate-card {
    padding: 36px 24px;
  }

  .game-modal-top {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .hero-section {
    padding-top: 72px;
  }

  .logo-text {
    font-size: 24px;
  }

  .logo-icon {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .game-thumbnail {
    height: 550px;
  }

  .game-thumbnail-placeholder {
    font-size: 24px;
  }

  .game-title {
    font-size: 24px;
  }
}

.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.game-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.game-thumbnail {
  position: relative;
  background: #0f172a;
}

.game-thumbnail-placeholder {
  position: relative;
  min-height: 560px;
  background-color: #0f172a;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
}

/* легке затемнення тільки знизу, щоб не вбивати картинку */
.game-thumbnail-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(15, 23, 42, 0.45) 0%,
      rgba(15, 23, 42, 0.12) 28%,
      rgba(15, 23, 42, 0) 52%
    );
  pointer-events: none;
}

/* прибираємо зайвий контент поверх картинки */
.preview-stage {
  display: none;
}

/* кнопки поверх картинки знизу */
.game-overlay {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
}

.game-overlay .btn-play,
.game-overlay .btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: 0.2s ease;
}

.game-overlay .btn-play {
  border: none;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
  cursor: pointer;
}

.game-overlay .btn-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.36);
}

.game-overlay .btn-login {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.game-overlay .btn-login:hover {
  background: #ffffff;
  transform: translateY(-2px);
}

.game-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 24px;
}

.game-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-title {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.game-meta {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
  max-width: 680px;
}

/* нижню кнопку залишаємо акуратною */
.game-info .btn-play {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  background: #14b8a6;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.22);
}

.game-info .btn-play:hover {
  transform: translateY(-2px);
}

/* адаптив */
@media (max-width: 768px) {
  .game-thumbnail-placeholder {
    min-height: 420px;
  }

  .game-overlay {
    left: 16px;
    right: 16px;
    bottom: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .game-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-info .btn-play {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .game-modal {
    padding: 8px;
    align-items: stretch;
    justify-content: stretch;
  }

  .game-modal-card {
    width: 100%;
    max-width: none;
    height: calc(100dvh - 16px);
    max-height: none;
    margin: 0;
    border-radius: 20px;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
  }

  .game-modal-top {
    padding: 12px 14px;
    gap: 8px;
  }

  .game-modal-top h3,
  .game-modal-top h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1;
  }

  .game-modal-top p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.4;
  }

  .game-frame-wrap {
    aspect-ratio: auto !important;
    height: 100%;
    min-height: 0;
    background: #fff;
    overflow: hidden;
  }

  .game-frame-wrap iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
  }
}

@media (max-width: 560px) {
  .game-modal {
    padding: 0;
  }

  .game-modal-card {
    height: 100dvh;
    border-radius: 0;
  }

  .game-modal-top {
    padding: 10px 12px;
  }

  .game-modal-top p {
    display: none;
  }
}