/* ==========================================
   fh6guide.net - Forza Horizon 6 Guide
   Dark Theme Stylesheet
   ========================================== */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --bg-hover: #243044;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #ff6b35;
  --accent-hover: #ff8555;
  --accent-glow: rgba(255, 107, 53, 0.3);
  --border: #1e293b;
  --border-light: #334155;
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --info: #3b82f6;
  --purple: #a855f7;

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  --container-max: 1200px;
  --header-height: 64px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .accent {
  color: var(--accent);
}

.logo:hover {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* --- Main Content --- */
.main-wrapper {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px 20px;
  min-height: calc(100vh - var(--header-height) - 200px);
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 60px 20px 48px;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
}

/* --- Section Headers --- */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.section-title .accent {
  color: var(--accent);
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card .card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Article / Page Content --- */
.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.page-header .breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.page-header .breadcrumb a {
  color: var(--text-muted);
}

.page-header .breadcrumb a:hover {
  color: var(--accent);
}

.page-header .meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.content-body {
  font-size: 1rem;
  line-height: 1.8;
}

.content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.content-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 28px 0 12px;
}

.content-body p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.content-body ul, .content-body ol {
  margin: 0 0 20px 24px;
  color: var(--text-secondary);
}

.content-body li {
  margin-bottom: 8px;
}

.content-body strong {
  color: var(--text-primary);
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead {
  background: var(--bg-secondary);
}

th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  white-space: nowrap;
  border-bottom: 2px solid var(--border-light);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

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

tbody tr:hover {
  background: rgba(255, 107, 53, 0.04);
}

/* --- Step-by-Step Guide --- */
.steps-list {
  counter-reset: step;
  list-style: none;
  margin: 24px 0;
}

.steps-list li {
  counter-increment: step;
  padding: 16px 20px 16px 56px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  position: relative;
  color: var(--text-secondary);
}

.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.steps-list li strong {
  color: var(--text-primary);
}

/* --- Tags / Badges --- */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tag-difficulty-easy { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.tag-difficulty-medium { background: rgba(234, 179, 8, 0.15); color: var(--warning); }
.tag-difficulty-hard { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.tag-platform { background: rgba(59, 130, 246, 0.15); color: var(--info); }
.tag-new { background: rgba(168, 85, 247, 0.15); color: var(--purple); }

/* --- Callout Box --- */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius);
  border-left: 4px solid;
  margin: 24px 0;
}

.callout-tip { background: rgba(34, 197, 94, 0.08); border-color: var(--success); }
.callout-info { background: rgba(59, 130, 246, 0.08); border-color: var(--info); }
.callout-warning { background: rgba(234, 179, 8, 0.08); border-color: var(--warning); }
.callout-danger { background: rgba(239, 68, 68, 0.08); border-color: var(--danger); }

.callout-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.callout p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 32px 20px;
  text-align: center;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner a {
  color: var(--text-secondary);
}

.footer-inner a:hover {
  color: var(--accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

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

  .main-wrapper {
    padding: 20px 16px;
  }

  th, td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .hero { padding: 32px 12px; }
  .hero h1 { font-size: 1.5rem; }
}

/* --- Utilities --- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
