/* Blaze Apostas - Design System Implementation */

:root {
  /* Colors */
  --color-canvas: #0F1923;
  --color-surface-raised: #151E2A;
  --color-surface-sunken: #101820;
  --color-surface-panel: #19222C;
  --color-surface-topbar: #191C27;
  --color-surface-card: #0F1923;
  --color-border-subtle: #232D3A;
  --color-border-strong: #2C3A4B;
  --color-divider: #1E2A37;
  --color-focus-ring: #F12C4C80;
  --color-overlay-75: #0B0F1580;
  --color-shadow-base: rgba(0,0,0,0.35);
  --color-text-high: #FFFFFF;
  --color-text-med: #B8C1CD;
  --color-text-low: #8C98A8;
  --color-text-muted: #6E7A89;
  --color-primary: #F12C4C;
  --color-primary-hover: #FF2F52;
  --color-primary-active: #D82744;
  --color-secondary: #223142;
  --color-secondary-hover: #2A3A4E;
  --color-secondary-active: #1B2836;
  --color-positive: #39B042;
  --color-warning: #F6B629;
  --color-info: #1CB6D5;
  --color-promo-purple: #5230C0;
  --color-chip-bg: #1C2836;
  --color-chip-active-bg: #263548;
  --color-chip-border: #2B3A4C;
  
  /* Gradients */
  --gradient-banner: linear-gradient(90deg, #B22820 0%, #F6B629 100%);
  --gradient-cta-primary: linear-gradient(180deg, #F12C4C 0%, #D82744 100%);
  --gradient-card-overlay-top: linear-gradient(180deg, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0) 48%);
  --gradient-card-overlay-bottom: linear-gradient(0deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 60%);
  
  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;
  
  /* Shadows */
  --shadow-card: 0 10px 24px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.02) inset;
  --shadow-chip: 0 1px 0 rgba(255,255,255,0.06) inset;
  --shadow-button: 0 6px 14px rgba(0,0,0,0.35);
  --shadow-popover: 0 18px 40px rgba(0,0,0,0.45);
  
  /* Typography */
  --font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-xxl: 28px;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --line-height-tight: 1.15;
  --line-height-normal: 1.3;
  --line-height-relaxed: 1.45;
  
  /* Spacing */
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-64: 64px;
  
  /* Container */
  --container-max-width: 1200px;
  --container-padding: 20px;
}

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-med);
  background-color: var(--color-canvas);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  decoding: async;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-high);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-16);
}

h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-24);
}

h2 {
  font-size: clamp(22px, 4vw, 32px);
  margin-top: var(--space-48);
  margin-bottom: var(--space-24);
}

h3 {
  font-size: clamp(18px, 3vw, 24px);
  margin-top: var(--space-32);
  margin-bottom: var(--space-16);
}

h4 {
  font-size: var(--font-size-lg);
  margin-top: var(--space-24);
  margin-bottom: var(--space-12);
}

p {
  margin-bottom: var(--space-16);
  color: var(--color-text-med);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

a:hover {
  color: var(--color-primary-hover);
}

a:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Lists */
ul, ol {
  margin-bottom: var(--space-20);
  padding-left: var(--space-24);
}

li {
  margin-bottom: var(--space-8);
  color: var(--color-text-med);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-24) 0;
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
  overflow: hidden;
}

thead {
  background: var(--color-secondary);
}

th, td {
  padding: var(--space-12) var(--space-16);
  text-align: left;
  border-bottom: 1px solid var(--color-border-subtle);
}

th {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-high);
}

td {
  color: var(--color-text-med);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--color-surface-sunken);
}

/* Header */
header {
  background: var(--color-surface-topbar);
  border-bottom: 1px solid var(--color-border-strong);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  padding: var(--space-12) 0;
  border-bottom: 1px solid var(--color-border-subtle);
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.header-cta-buttons {
  display: flex;
  gap: var(--space-12);
}

.header-nav {
  padding: var(--space-12) 0;
}

.header-nav nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: var(--space-32);
  flex-wrap: wrap;
}

.header-nav nav a {
  color: var(--color-text-med);
  font-weight: var(--font-weight-medium);
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-sm);
  transition: all 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.header-nav nav a:hover {
  color: var(--color-text-high);
  background: rgba(255,255,255,0.05);
}

.header-nav nav a.active {
  color: var(--color-text-high);
}

/* Mobile menu */
.mobile-menu-toggle {
  display: none;
  background: var(--color-secondary);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-high);
  padding: var(--space-10);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--font-size-xl);
  line-height: 1;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--mobile-header-height, 72px);
  left: 0;
  right: 0;
  background: var(--color-surface-topbar);
  border-bottom: 1px solid var(--color-border-strong);
  max-height: calc(100vh - var(--mobile-header-height, 72px));
  overflow-y: auto;
  box-shadow: var(--shadow-popover);
  z-index: 999;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu nav ul {
  list-style: none;
  padding: var(--space-16);
}

.mobile-menu nav li {
  margin-bottom: 0;
}

.mobile-menu nav a {
  display: block;
  padding: var(--space-16);
  color: var(--color-text-med);
  border-bottom: 1px solid var(--color-border-subtle);
}

.mobile-menu nav a:hover {
  background: rgba(255,255,255,0.05);
  color: var(--color-text-high);
}

.mobile-menu .header-cta-buttons {
  flex-direction: column;
  padding: var(--space-16);
  gap: var(--space-12);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-24);
  min-width: 60px;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--gradient-cta-primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-button);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.4);
}

.btn-primary:active {
  background: var(--color-primary-active);
  transform: translateY(0);
}

.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-text-high);
  border: 1px solid var(--color-border-strong);
}

.btn-secondary:hover {
  background: var(--color-secondary-hover);
}

.btn-secondary:active {
  background: var(--color-secondary-active);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: var(--space-16) 0;
  font-size: var(--font-size-sm);
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.breadcrumbs li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.breadcrumbs li:not(:last-child)::after {
  content: '›';
  color: var(--color-text-low);
}

.breadcrumbs a {
  color: var(--color-text-low);
}

.breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumbs .current {
  color: var(--color-text-med);
}

/* Hero section */
#hero {
  padding: var(--space-48) 0;
}

.hero-content {
  display: grid;
  gap: var(--space-32);
  align-items: start;
}

.hero-text h1 {
  margin-bottom: var(--space-20);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  margin-bottom: var(--space-20);
  color: var(--color-text-low);
  font-size: var(--font-size-sm);
}

.hero-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-card);
  box-shadow: var(--shadow-card);
}

.hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-cta {
  text-align: center;
  margin-top: var(--space-20);
}

.fact-checked {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-12) var(--space-16);
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  margin-top: var(--space-24);
  font-size: var(--font-size-sm);
  color: var(--color-text-med);
}

.fact-checked svg {
  flex-shrink: 0;
  fill: var(--color-positive);
}

/* Table of Contents */
.toc {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  margin: var(--space-32) 0;
  overflow: hidden;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-16) var(--space-20);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--color-border-subtle);
}

.toc-header h2 {
  margin: 0;
  font-size: var(--font-size-lg);
}

.toc-toggle {
  background: none;
  border: none;
  color: var(--color-text-med);
  font-size: var(--font-size-xl);
  cursor: pointer;
  transition: transform 180ms;
  padding: 0;
  line-height: 1;
}

.toc.expanded .toc-toggle {
  transform: rotate(180deg);
}

.toc-content {
  display: none;
  padding: var(--space-20);
}

.toc.expanded .toc-content {
  display: block;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: var(--space-8);
}

.toc-list a {
  display: block;
  padding: var(--space-8) var(--space-12);
  color: var(--color-text-med);
  border-radius: var(--radius-sm);
  transition: all 180ms;
}

.toc-list a:hover {
  background: var(--color-surface-sunken);
  color: var(--color-text-high);
}

.toc-list a.active {
  background: var(--color-chip-active-bg);
  color: var(--color-text-high);
  border-left: 2px solid var(--color-primary);
}

/* Games section */
#games {
  padding: var(--space-64) 0;
}

#games h2 {
  text-align: center;
  margin-bottom: var(--space-40);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-20);
  margin-bottom: var(--space-32);
}

.game-card {
  position: relative;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  aspect-ratio: 3/4;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-card-overlay-bottom);
  display: flex;
  align-items: flex-end;
  padding: var(--space-16);
}

.game-card-title {
  color: var(--color-text-high);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-md);
}

.game-card-cta {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: all 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0,0,0,0.45);
  border-color: var(--color-border-strong);
}

.game-card:hover .game-card-cta {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: all;
}

.game-card:hover .game-card-overlay {
  background: rgba(0,0,0,0.7);
}

/* Content sections */
main section {
  padding: var(--space-48) 0;
}

main section:first-of-type {
  padding-top: var(--space-24);
}

.section-image {
  margin: var(--space-32) auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  max-width: 100%;
}

.section-image img {
  width: 100%;
  height: auto;
}

/* Author section */
#author {
  padding: var(--space-48) 0;
}

.author-content {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-32);
  display: flex;
  gap: var(--space-24);
  align-items: start;
}

.author-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border-strong);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-info h3 {
  margin: 0 0 var(--space-8) 0;
  font-size: var(--font-size-lg);
}

.author-meta {
  color: var(--color-text-low);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-12);
}

.author-bio {
  color: var(--color-text-med);
  font-size: var(--font-size-base);
}

/* FAQ section */
#faq {
  padding: var(--space-48) 0;
}

#faq h2 {
  margin-bottom: var(--space-32);
}

.faq-item {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-12);
  overflow: hidden;
}

.faq-item summary {
  padding: var(--space-16) var(--space-20);
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-high);
  transition: background 180ms;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  background: var(--color-surface-sunken);
}

.faq-item summary::after {
  content: '+';
  font-size: var(--font-size-xl);
  line-height: 1;
  transition: transform 180ms;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-content {
  padding: 0 var(--space-20) var(--space-20) var(--space-20);
}

.faq-content p:last-child {
  margin-bottom: 0;
}

/* Footer */
footer {
  background: var(--color-surface-panel);
  border-top: 1px solid var(--color-border-strong);
  padding: var(--space-48) 0 var(--space-24) 0;
  margin-top: var(--space-64);
}

.footer-content {
  display: grid;
  gap: var(--space-40);
  margin-bottom: var(--space-40);
}

.footer-section h4 {
  color: var(--color-text-high);
  font-size: var(--font-size-md);
  margin-bottom: var(--space-16);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: var(--space-8);
}

.footer-section a {
  color: var(--color-text-low);
  font-size: var(--font-size-sm);
}

.footer-section a:hover {
  color: var(--color-primary);
}

.payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  margin-top: var(--space-16);
}

.payment-icon {
  width: 50px;
  height: 32px;
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.payment-icon svg,
.payment-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.footer-bottom {
  padding-top: var(--space-24);
  border-top: 1px solid var(--color-border-subtle);
  text-align: center;
  color: var(--color-text-low);
  font-size: var(--font-size-sm);
}

.footer-logo {
  margin-bottom: var(--space-16);
}

.footer-logo img {
  height: 32px;
  width: auto;
  margin: 0 auto;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: var(--space-24);
  right: var(--space-24);
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-button);
  transition: all 180ms;
  z-index: 100;
}

.back-to-top:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
}

.back-to-top.visible {
  display: flex;
}

/* Responsive tables */
@media (max-width: 768px) {
  .table-responsive {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-card {
    display: none;
  }
  
  table.card-mode {
    display: none;
  }
  
  .table-card.active {
    display: block;
  }
  
  .table-card-item {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-16);
    margin-bottom: var(--space-12);
  }
  
  .table-card-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-8) 0;
    border-bottom: 1px solid var(--color-border-subtle);
  }
  
  .table-card-row:last-child {
    border-bottom: none;
  }
  
  .table-card-label {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-high);
  }
  
  .table-card-value {
    color: var(--color-text-med);
    text-align: right;
  }
}

/* Responsive Design */
@media (min-width: 769px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .games-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 16px;
  }
  
  .header-top {
    padding: var(--space-16) 0;
  }
  
  .header-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .header-cta-buttons {
    display: none;
  }
  
  h1 {
    font-size: 28px;
  }
  
  h2 {
    font-size: 22px;
    margin-top: var(--space-32);
  }
  
  h3 {
    font-size: 18px;
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: var(--space-16);
    padding-bottom: var(--space-16);
    scroll-snap-type: x mandatory;
  }
  
  .game-card {
    flex: 0 0 150px;
    scroll-snap-align: start;
  }
  
  .author-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .author-avatar {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: var(--space-10) var(--space-16);
    font-size: var(--font-size-sm);
  }
  
  .back-to-top {
    bottom: var(--space-16);
    right: var(--space-16);
    width: 40px;
    height: 40px;
  }
}

/* Print styles */
@media print {
  header, footer, .back-to-top, .toc, #games {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  a {
    text-decoration: underline;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus styles */
*:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


