:root {
  --free-gradient: linear-gradient(135deg, rgba(233, 168, 107, 0.18), rgba(47, 72, 88, 0.10));
}

html,
body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

#games {
  scroll-margin-top: 24px;
}

.free-games-page {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 72px);
  padding-bottom: clamp(56px, 8vw, 96px);
}

.free-hero {
  background: var(--free-gradient);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid rgba(47, 72, 88, 0.18);
  box-shadow: 0 18px 44px rgba(25, 35, 55, 0.14);
  padding: clamp(40px, 6vw, 72px) clamp(32px, 5vw, 60px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content {
  max-width: 840px;
  text-align: center;
}

.hero-content h1 {
  font-size: clamp(32px, 4.8vw, 46px);
  margin: 0 0 16px;
  color: var(--brand-2);
}

.hero-points {
  margin: 28px auto 32px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-leaderboard {
  background: rgba(255, 255, 255, 0.85);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(47, 72, 88, 0.18);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  padding: clamp(22px, 3vw, 30px);
  display: grid;
  gap: 18px;
}

.hero-top-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.hero-top-grid .top-score {
  margin: 0;
}

.hero-top-score {
  background: rgba(233, 168, 107, 0.12);
  border-color: rgba(233, 168, 107, 0.32);
  box-shadow: none;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(233, 168, 107, 0.22);
  color: #8a5e2f;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.hero-score {
  margin: 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand-2);
}

.hero-note {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.section-header {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.game-card-points {
  list-style: disc;
  padding-left: 20px;
  margin: 4px 0 12px;
  text-align: left;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.top-score {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(47, 72, 88, 0.18);
  border-radius: 12px;
  padding: 12px 16px;
  display: grid;
  gap: 4px;
  text-align: left;
  font-size: 14px;
  color: var(--brand-2);
  box-shadow: 0 12px 26px rgba(25, 35, 55, 0.08);
}

.top-score-label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: rgba(47, 72, 88, 0.6);
  font-weight: 700;
}

.top-score-value {
  font-weight: 600;
  color: var(--brand-2);
}

.top-score--calm {
  background: rgba(233, 168, 107, 0.12);
  border: 1px solid rgba(233, 168, 107, 0.3);
  color: #8a5e2f;
}

.top-score--empty .top-score-value,
.top-score--error .top-score-value {
  font-weight: 500;
  color: var(--muted);
}

.free-highlights .h2 {
  margin-bottom: 28px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.stat-card {
  background: var(--paper);
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(47, 72, 88, 0.14);
  box-shadow: 0 12px 28px rgba(25, 35, 55, 0.08);
  padding: 24px 22px;
  display: grid;
  gap: 10px;
}

.stat-icon {
  font-size: 32px;
}

.stat-card h3 {
  margin: 0;
  font-size: 18px;
  color: var(--brand-2);
}

.stat-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.content-block .h2 {
  margin-bottom: 20px;
}

.steps-list {
  counter-reset: step-counter;
  display: grid;
  gap: 14px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.steps-list li {
  background: var(--paper);
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(47, 72, 88, 0.12);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  padding: 18px 20px 18px 54px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.steps-list li strong {
  display: block;
  font-size: 16px;
  color: var(--brand-2);
  margin-bottom: 6px;
}

.steps-list li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(233, 168, 107, 0.25);
  color: #8a5e2f;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq {
  background: var(--paper);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(47, 72, 88, 0.12);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.07);
  padding: clamp(26px, 4vw, 40px);
}

.faq > h2 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 24px;
  color: var(--brand-2);
}

.faq-item > summary {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}

.cta-panel {
  background: linear-gradient(135deg, rgba(47, 72, 88, 0.85), rgba(47, 72, 88, 0.65));
  color: #fff;
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(32px, 5vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.cta-panel .cta-content h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 32px);
}

.cta-panel .cta-content p {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  max-width: 640px;
}

.cta-panel .btn {
  background: var(--brand);
  color: #120a00;
  font-weight: 700;
}

.back-link-container {
  text-align: center;
  margin-top: 12px;
}

.back-link {
  text-decoration: none;
  color: var(--brand-2);
  font-weight: 600;
  font-size: 15px;
}

.back-link:hover,
.back-link:focus {
  text-decoration: underline;
}

@media (max-width: 980px) {
  .free-hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }
}

.game-card .btn.full {
  margin-top: auto;
}

@media (max-width: 768px) {
  .hero-top-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-content h1 {
    font-size: clamp(28px, 8vw, 34px);
  }

  .hero-actions {
    flex-direction: column;
  }

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

  .steps-list li {
    padding: 18px 18px 18px 50px;
  }

  .hero-top-grid {
    grid-template-columns: 1fr;
  }
}
