:root {
  color-scheme: dark;
  --bg: #101113;
  --paper: #171a1f;
  --paper-raised: #1c1f25;
  --ink: #f9fafb;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.1);
  --blue: #3b82f6;
  --teal: #10b981;
  --amber: #f59e0b;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --soft-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);

  font-family:
    "Outfit",
    system-ui,
    -apple-system,
    sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f6;
  --paper: #ffffff;
  --paper-raised: #ffffff;
  --ink: #111827;
  --muted: #4b5563;
  --line: #e5e7eb;
  --blue: #2563eb;
  --teal: #059669;
  --amber: #d97706;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --soft-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

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

html {
  min-height: 100%;
  background: var(--bg);
  transition: background-color 0.3s ease;
}

body {
  min-height: 100svh;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Header Container */
.header-container {
  width: 100%;
  padding: 16px 24px 0;
  display: flex;
  justify-content: center;
}

.site-header {
  width: min(1000px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

:root[data-theme="dark"] .brand-mark-light {
  display: none;
}
:root[data-theme="light"] .brand-mark-dark {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.access-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  text-transform: uppercase;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--muted);
}

.theme-toggle__icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: inset -5px -3px 0 rgba(0, 0, 0, 0.3);
}

:root[data-theme="light"] .theme-toggle__icon {
  background: transparent;
  box-shadow: none;
  border: 2px solid var(--ink);
  position: relative;
}

:root[data-theme="light"] .theme-toggle__icon::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 4px;
  background: var(--ink);
  box-shadow: 0 14px 0 var(--ink);
}

:root[data-theme="light"] .theme-toggle__icon::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 2px;
  background: var(--ink);
  box-shadow: 14px 0 0 var(--ink);
}

/* Main Layout */
.portal-main {
  flex: 1;
  width: min(1000px, calc(100% - 48px));
  margin: 0 auto;
  padding: 60px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-section h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 400px;
}

.restriction-notice {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 6px;
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
}

/* Game Options */
.game-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Game Card */
.game-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    border-color 0.2s;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--muted);
}

.game-card-content {
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.game-header {
  flex-shrink: 0;
}

.game-icon-container {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line);
}

.game-icon-container svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bg-quiz {
  color: var(--blue);
}
.bg-trilha {
  color: var(--teal);
}

.game-info h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.game-info p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.game-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--paper);
}

.text-quiz {
  color: var(--blue);
}
.text-trilha {
  color: var(--teal);
}

.arrow-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.game-card:hover .arrow-icon {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 900px) {
  .portal-main {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0;
  }

  .hero-section {
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .hero-subtitle {
    max-width: 600px;
  }
}

@media (max-width: 600px) {
  .header-container {
    padding: 8px 12px 0;
  }

  .brand-text {
    display: none;
  }

  .access-badge {
    display: none;
  }

  .portal-main {
    padding: 16px 0;
    gap: 16px;
    width: min(1000px, calc(100% - 24px));
  }

  .hero-section h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .game-options {
    gap: 12px;
  }

  .game-card-content {
    padding: 16px;
    gap: 12px;
    align-items: center;
  }

  .game-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .game-icon-container svg {
    width: 24px;
    height: 24px;
  }

  .game-info h2 {
    font-size: 1.1rem;
    margin-bottom: 2px;
  }

  .game-info p {
    font-size: 0.85rem;
    line-height: 1.3;
  }

  .game-footer {
    padding: 12px 16px;
    font-size: 0.85rem;
  }
}
