/* Design System Implementation */
:root {
  /* Colors from design system */
  --bg-gradient-start: #003060;
  --bg-gradient-end: #002040;
  --nav-gradient-start: #083060;
  --nav-gradient-end: #003058;
  --card-bg: #083870;
  --card-border: #0E4A85;
  --card-featured-start: #0A4A8A;
  --card-featured-end: #083060;
  --btn-primary-start: #F86030;
  --btn-primary-end: #E04820;
  --btn-primary-hover-start: #FF6A3A;
  --btn-primary-hover-end: #E85028;
  --btn-primary-active: #D84018;
  --btn-secondary-bg: #083870;
  --btn-secondary-border: #3098F8;
  --text-headline: #FFFFFF;
  --text-body: #D8E0E8;
  --text-muted: #A0B0C0;
  --text-accent: #F8B800;
  --icon-nav: #FFFFFF;
  --icon-nav-inactive: #A8B8C8;
  --icon-action: #3098F8;
  --badge-live: #F85030;
  --badge-promo: #F8B800;
  --badge-promo-text: #003060;
  --focus-outline: #FFD000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: linear-gradient(90deg, var(--nav-gradient-start) 0%, var(--nav-gradient-end) 100%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: inline-block;
  text-decoration: none;
}

.logo svg {
  height: 45px;
  width: auto;
  display: block;
}

.header-cta {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
  min-width: 60px;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(180deg, var(--btn-primary-start) 0%, var(--btn-primary-end) 100%);
  color: var(--text-headline);
  box-shadow: 0 3px 8px rgba(248, 80, 48, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(180deg, var(--btn-primary-hover-start) 0%, var(--btn-primary-hover-end) 100%);
}

.btn-primary:active {
  background: var(--btn-primary-active);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.btn-primary:focus {
  outline: 2px solid var(--focus-outline);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--text-headline);
  border: 1px solid var(--btn-secondary-border);
}

.btn-secondary:hover {
  background: #0A4A8A;
}

.header-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0;
}

.header-nav nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.header-nav a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.header-nav a:hover {
  color: var(--text-headline);
}

/* Table of Contents */
.toc-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  overflow: hidden;
}

.toc {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.toc::-webkit-scrollbar {
  display: none;
}

.toc-item {
  white-space: nowrap;
  padding: 6px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  border-radius: 6px;
  transition: all 0.3s;
}

.toc-item:hover {
  color: var(--text-headline);
  background: rgba(255, 255, 255, 0.1);
}

.toc-item.active {
  color: var(--text-accent);
  font-weight: 600;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-headline);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
  display: flex;
}

/* Hero Section */
.hero {
  padding: 20px 20px 40px 20px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.hero h1 {
  grid-column: 1 / -1;
  color: var(--text-headline);
  font-size: 36px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-image {
  text-align: center;
  display: flex;
  flex-direction: column;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  order: 1;
}

.reading-time {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

.hero-cta {
  margin-top: 20px;
  text-align: center;
  order: 2;
}

.fact-checked {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 20px;
}

/* Games Section */
.games-section {
  padding: 60px 20px;
}

.games-section h2 {
  color: var(--text-headline);
  font-size: 32px;
  margin-bottom: 30px;
  text-align: center;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.game-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: cover;
}

.game-card h3 {
  color: var(--text-headline);
  font-size: 16px;
  margin-bottom: 16px;
  flex-grow: 1;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.game-play-btn {
  margin-top: auto;
  width: 100%;
}

.game-play-btn .btn {
  width: 100%;
  padding: 12px 20px;
}

/* Content Sections */
section {
  padding: 60px 20px;
}

section h2 {
  color: var(--text-headline);
  font-size: 28px;
  margin-bottom: 24px;
}

section h3 {
  color: var(--text-headline);
  font-size: 22px;
  margin-top: 24px;
  margin-bottom: 16px;
}

section p {
  margin-bottom: 16px;
  line-height: 1.8;
}

section ul, section ol {
  margin-left: 24px;
  margin-bottom: 24px;
}

section li {
  margin-bottom: 8px;
}

section figure {
  margin: 24px 0;
  text-align: center;
}

section figure img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

section figcaption {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
}

table thead {
  background: rgba(255, 255, 255, 0.05);
}

table th {
  padding: 12px;
  text-align: left;
  color: var(--text-headline);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

table tbody tr:hover {
  background: #0A4A8A;
}

/* Author Section */
.author-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: start;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-info h3 {
  color: var(--text-headline);
  margin-top: 0;
}

.author-info p {
  color: var(--text-muted);
  font-size: 14px;
}

/* FAQ Section */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.faq-item summary {
  padding: 20px;
  cursor: pointer;
  color: var(--text-headline);
  font-weight: 600;
  list-style: none;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  font-size: 24px;
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 20px 20px;
  color: var(--text-body);
}

/* Footer */
footer {
  background: linear-gradient(90deg, var(--nav-gradient-start) 0%, var(--nav-gradient-end) 100%);
  padding: 40px 20px;
  margin-top: 60px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.footer-logo a {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 20px;
}

.footer-logo svg {
  height: 45px;
  width: auto;
  display: block;
}

.footer-links h4 {
  color: var(--text-headline);
  margin-bottom: 16px;
  font-size: 16px;
}

.footer-links ul {
  list-style: none;
  margin: 0;
}

.footer-links a {
  color: var(--text-body);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--text-headline);
}

.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.payment-methods img {
  height: 30px;
  width: auto;
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.gambleaware-link {
  display: inline-block;
  margin-top: 20px;
}

.gambleaware-link img {
  height: 40px;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  flex-wrap: wrap;
}

.breadcrumbs li {
  margin: 0;
}

.breadcrumbs a {
  color: var(--text-body);
  text-decoration: none;
}

.breadcrumbs li:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: var(--text-muted);
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--btn-primary-start);
  color: var(--text-headline);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
  .header-top {
    flex-wrap: wrap;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-top {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .header-cta {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }

  .header-cta .btn {
    padding: 6px 12px;
    font-size: 11px;
    white-space: nowrap;
  }

  .logo svg {
    height: 35px;
  }

  .header-nav {
    display: none;
  }

  .mobile-menu.active .header-nav {
    display: block;
  }

  .mobile-menu.active .header-nav nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mobile-menu.active .header-nav a {
    display: block;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-menu.active .header-nav a:last-child {
    border-bottom: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 28px;
  }

  .hero-image {
    flex-direction: column;
  }

  .hero-cta {
    margin-top: 0;
    margin-bottom: 20px;
    order: 1;
  }

  .hero-image img {
    order: 2;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    overflow-x: auto;
    display: flex;
    gap: 16px;
    padding-bottom: 10px;
  }

  .game-card {
    min-width: 180px;
    padding: 12px;
  }
  
  .game-card h3 {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .game-play-btn .btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .author-section {
    flex-direction: column;
    text-align: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Step-by-step sections */
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  list-style: none;
  margin: 24px 0;
  padding: 0;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  position: relative;
}

.step-index {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--btn-primary-start);
  color: var(--text-headline);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 12px;
}

.step-title {
  color: var(--text-headline);
  font-size: 18px;
  margin-bottom: 8px;
}

.step-body p {
  margin: 0;
  color: var(--text-body);
}

@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Pros & Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

.pros-col, .cons-col {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
}

.pros-list, .cons-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pros-list li, .cons-list li {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.icon-check, .icon-cross {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.icon-check {
  fill: #4CAF50;
}

.icon-cross {
  fill: #F85030;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (max-width: 768px) {
  .pros-cons {
    grid-template-columns: 1fr;
  }
}

/* Bonus Slider */
.bonus-slider {
  position: relative;
  margin: 24px 0;
}

.bonus-cards {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 0;
  list-style: none;
  margin: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.bonus-cards::-webkit-scrollbar {
  display: none;
}

.bonus-card {
  min-width: 280px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 24px;
  scroll-snap-align: start;
}

.bonus-title {
  color: var(--text-headline);
  font-size: 20px;
  margin-bottom: 12px;
}

.bonus-desc {
  color: var(--text-body);
  font-size: 14px;
  margin-bottom: 16px;
}

.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-headline);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.slider-prev {
  left: -20px;
}

.slider-next {
  right: -20px;
}

@media (max-width: 768px) {
  .slider-prev, .slider-next {
    display: none;
  }
}
