/* ============================================================
   BASE.CSS — 7Games App Landing (pt-BR)
   Variáveis, Reset, Tipografia, Utilitários
   ============================================================ */

/* --- CSS Variables (paleta 7Games) --- */
:root {
  --color-dark: #0C120E;
  --color-bg: #121A15;
  --color-surface: #1A241E;
  --color-primary: #22C55E;
  --color-primary-hover: #16a34a;
  --color-accent: #F5C518;
  --color-odds: #F5C518;
  --color-live: #EF4444;
  --color-text: #F2F4F3;
  --color-muted: #8A978F;
  --color-border: #2a3a2f;
  --color-overlay: rgba(12, 18, 14, 0.85);
  --color-white: #ffffff;
  --color-black: #000000;

  /* Tipografia */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.5rem;
  --fs-3xl: 1.875rem;
  --fs-4xl: 2.25rem;
  --fs-5xl: 3rem;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  /* Espaçamento */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Bordas */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-glow-green: 0 0 20px rgba(34,197,94,0.3);
  --shadow-glow-gold: 0 0 20px rgba(245,197,24,0.3);

  /* Transições */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 240px;
  --max-width: 1200px;
  --container-padding: 1rem;

  /* Z-indexes */
  --z-sidebar: 100;
  --z-header: 200;
  --z-mobile-menu: 300;
  --z-cookie: 400;
  --z-bottom-bar: 500;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-text);
}

/* --- Tipografia --- */
h1 { font-size: var(--fs-4xl); margin-bottom: var(--space-lg); }
h2 { font-size: var(--fs-3xl); margin-bottom: var(--space-lg); }
h3 { font-size: var(--fs-xl); margin-bottom: var(--space-md); }
h4 { font-size: var(--fs-lg); margin-bottom: var(--space-md); }
h5 { font-size: var(--fs-base); margin-bottom: var(--space-sm); }
h6 { font-size: var(--fs-sm); margin-bottom: var(--space-sm); }

p {
  margin-bottom: var(--space-md);
  line-height: var(--lh-relaxed);
}

strong { font-weight: var(--fw-semibold); }

small { font-size: var(--fs-sm); }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Sections --- */
.section {
  padding: var(--space-3xl) 0;
}

.section--dark {
  background-color: var(--color-dark);
}

.section--surface {
  background-color: var(--color-surface);
}

.section__title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.section__subtitle {
  font-size: var(--fs-base);
  color: var(--color-muted);
  margin-bottom: var(--space-xl);
}

/* --- Grid helpers --- */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 601px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1025px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: 44px;
  min-width: 44px;
  white-space: nowrap;
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-glow-green);
}
.btn--primary:hover {
  background-color: var(--color-primary-hover);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(34,197,94,0.4);
}

.btn--outline {
  border: 1.5px solid var(--color-muted);
  color: var(--color-text);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--accent {
  background-color: var(--color-accent);
  color: var(--color-black);
  font-weight: var(--fw-bold);
}
.btn--accent:hover {
  background-color: #e0b010;
  color: var(--color-black);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: var(--fs-lg);
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
}

.btn--full {
  width: 100%;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  padding: 0.5rem;
}
.btn--ghost:hover {
  color: var(--color-primary);
}

/* --- Cards --- */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-sm);
}

.card__text {
  font-size: var(--fs-sm);
  color: var(--color-muted);
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge--green {
  background-color: rgba(34,197,94,0.15);
  color: var(--color-primary);
  border: 1px solid rgba(34,197,94,0.3);
}

.badge--gold {
  background-color: rgba(245,197,24,0.15);
  color: var(--color-accent);
  border: 1px solid rgba(245,197,24,0.3);
}

.badge--red {
  background-color: rgba(239,68,68,0.15);
  color: var(--color-live);
  border: 1px solid rgba(239,68,68,0.3);
}

.badge--age {
  background-color: var(--color-live);
  color: var(--color-white);
  font-weight: var(--fw-bold);
  padding: 4px 8px;
  min-width: 32px;
  text-align: center;
}

/* --- Table Responsive --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.table-responsive table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
}

.table-responsive th,
.table-responsive td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-sm);
}

.table-responsive th {
  background-color: var(--color-dark);
  color: var(--color-accent);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  font-size: var(--fs-xs);
  letter-spacing: 0.5px;
}

.table-responsive td {
  color: var(--color-text);
}

.table-responsive tr:hover td {
  background-color: rgba(34,197,94,0.05);
}

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

/* --- Lists --- */
.list {
  margin-bottom: var(--space-lg);
}

.list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: var(--space-sm);
  line-height: var(--lh-relaxed);
}

.list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: 50%;
}

.list--check li::before {
  content: '✓';
  background: none;
  color: var(--color-primary);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  top: 0.15em;
  width: auto;
  height: auto;
}

.list--gold li::before {
  background-color: var(--color-accent);
}

/* --- Accordion / FAQ --- */
.accordion {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background-color: var(--color-surface);
  cursor: pointer;
  min-height: 44px;
  transition: background-color var(--transition-fast);
  gap: var(--space-md);
}

.accordion__header:hover {
  background-color: var(--color-dark);
}

.accordion__title {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  flex: 1;
}

.accordion__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
  color: var(--color-muted);
}

.accordion.active .accordion__icon {
  transform: rotate(180deg);
}

.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.accordion__content {
  padding: 0 var(--space-lg) var(--space-lg);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: var(--color-muted);
}

/* --- Disclaimer bar --- */
.disclaimer-bar {
  background-color: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--fs-xs);
  color: var(--color-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-xl);
}

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 44px;
  height: 44px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  font-size: var(--fs-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: var(--z-cookie);
  cursor: pointer;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* --- Divider --- */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border), transparent);
  margin: var(--space-2xl) 0;
}

/* --- Legal sections --- */
.legal-section {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--color-border);
}

.legal-section h2 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-lg);
}

.legal-section h3 {
  font-size: var(--fs-lg);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--color-accent);
}

.legal-section p,
.legal-section li {
  font-size: var(--fs-sm);
  color: var(--color-muted);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-sm);
}

/* --- Helpers --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted); }
.text-live { color: var(--color-live); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-lg { font-size: var(--fs-lg); }
.text-bold { font-weight: var(--fw-bold); }
.text-uppercase { text-transform: uppercase; }
.text-center-mobile { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

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

/* --- Mobile bottom bar space --- */
body {
  padding-bottom: 0;
}

@media (max-width: 600px) {
  body {
    padding-bottom: 70px;
  }

  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }

  .section {
    padding: var(--space-2xl) 0;
  }

  .text-center-mobile { text-align: center; }
}

@media (min-width: 601px) {
  :root {
    --container-padding: 1.5rem;
    --header-height: 70px;
  }
}

@media (min-width: 1025px) {
  :root {
    --container-padding: 2rem;
  }

  h1 { font-size: var(--fs-5xl); }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* --- Image placeholders (para slots de imagem) --- */
.img-placeholder {
  background-color: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: var(--fs-sm);
  overflow: hidden;
}

.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Code/Pre blocks --- */
pre, code {
  overflow-x: auto;
  max-width: 100%;
}


/* --- Responsive hardening: phones, tablets and touch devices --- */
html, body { max-width: 100%; }
body { overflow-x: hidden; }
.container { padding-left: max(var(--container-padding), env(safe-area-inset-left)); padding-right: max(var(--container-padding), env(safe-area-inset-right)); }
main, section, footer, header { min-width: 0; }
button, a { -webkit-tap-highlight-color: transparent; }

@media (max-width: 600px) {
  :root { --container-padding: 1rem; }
  .container { padding-left: 1rem; padding-right: 1rem; }
  .btn--lg { width: 100%; padding-left: 1rem; padding-right: 1rem; }
  .section__title, .section__subtitle { overflow-wrap: anywhere; }
  .table-responsive { max-width: 100%; }
  .table-responsive table { min-width: 520px; }
  .content-image .img-placeholder { height: auto !important; min-height: 0; }
  .content-image .img-placeholder img { width: 100%; height: auto; }
}

@media (min-width: 601px) and (max-width: 1024px) {
  :root { --container-padding: clamp(1rem, 4vw, 2rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
