/* ============================================================
   discovermods — Design System
   Dark gaming aesthetic. Orange accent. Clean typography.
   ============================================================ */

:root {
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --bg-elevated: #222222;
  --border: #2a2a2a;
  --text: #e0e0e0;
  --text-muted: #888888;
  --text-heading: #ffffff;
  --accent: #f77f00;
  --accent-hover: #e07000;
  --accent-glow: rgba(247, 127, 0, 0.15);
  --green: #4caf50;
  --red: #f44336;
  --blue: #4a9eff;
  --radius: 8px;
  --radius-sm: 4px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ---- HEADER ---- */
.site-header {
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 2rem;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }

.main-nav { display: flex; gap: 1.5rem; }
.main-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--text-heading);
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.search-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 3rem 2rem 1.5rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-col h3 {
  color: var(--text-heading);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: var(--text-muted); font-size: 0.85rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---- BREADCRUMB ---- */
.breadcrumb {
  max-width: 900px;
  margin: 1.5rem auto;
  padding: 0 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text); }

/* ---- HERO ---- */
.home-hero {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}
.home-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); text-decoration: none; color: var(--text-heading); }

.btn-download {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  margin-top: 1rem;
}
.btn-download:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }

/* ---- HOME CATEGORIES ---- */
.home-categories, .home-gta6 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}
.home-categories h2, .home-gta6 h2 {
  font-size: 1.5rem;
  color: var(--text-heading);
  margin-bottom: 1.5rem;
}
.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.home-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.15s;
}
.home-cat-card:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  text-decoration: none;
}
.home-cat-card h3 {
  color: var(--text-heading);
  font-size: 0.9rem;
  font-weight: 600;
}
.cat-icon { font-size: 1.5rem; }

/* ---- GTA 6 SECTION ---- */
.gta6-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.gta6-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.15s;
}
.gta6-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.gta6-card h3 { color: var(--text-heading); font-size: 1rem; margin-bottom: 0.5rem; }
.gta6-card p { color: var(--text-muted); font-size: 0.85rem; }

/* ---- CATEGORY HUB ---- */
.category-page, .hub-page, .mod-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.category-hero, .hub-hero {
  text-align: center;
  padding: 3rem 0 2rem;
}
.category-hero h1, .hub-hero h1 {
  font-size: 2rem;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
}
.category-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.category-count {
  font-size: 0.9rem;
  color: var(--accent);
  margin-top: 0.5rem;
}
.hub-search {
  max-width: 500px;
  margin: 1.5rem auto 0;
}
.hub-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
}
.hub-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ---- CATEGORY CARDS ---- */
.category-grid { margin: 2rem 0; }
.category-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.15s;
}
.category-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.category-card h3 { color: var(--text-heading); font-size: 1.1rem; margin-bottom: 0.5rem; }
.category-card p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.card-count {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ---- TAG CLOUD ---- */
.category-tags { margin: 1.5rem 0; }
.category-tags h2 { font-size: 1.1rem; color: var(--text-heading); margin-bottom: 0.75rem; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  display: inline-block;
  background: var(--bg-elevated);
  color: var(--text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

/* ---- MOD GRID ---- */
.mod-grid { margin: 2rem 0; }
.mod-grid h2 { font-size: 1.3rem; color: var(--text-heading); margin-bottom: 1rem; }
.mod-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* ---- MOD CARD ---- */
.mod-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.15s;
  display: block;
}
.mod-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.mod-card-img {
  aspect-ratio: 3/2;
  overflow: hidden;
  background: var(--bg);
}
.mod-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.mod-card:hover .mod-card-img img { transform: scale(1.05); }
.mod-card-info { padding: 1rem; }
.mod-card-info h3 {
  color: var(--text-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mod-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}
.mod-rating { color: var(--accent); }
.mod-downloads { color: var(--text-muted); }
.mod-card-tags { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.mod-card-tags .tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
}

/* ---- MOD DETAIL PAGE ---- */
.mod-detail header.mod-hero {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.mod-hero-content h1 {
  font-size: 1.75rem;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.mod-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.mod-stars { color: var(--accent); font-weight: 600; }
.mod-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.mod-author { color: var(--text-muted); font-size: 0.85rem; }

/* ---- SECTIONS ---- */
.mod-gallery, .mod-description, .mod-review,
.mod-stats, .mod-install, .mod-faq, .related-mods {
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.mod-gallery h2, .mod-description h2, .mod-review h2,
.mod-stats h2, .mod-install h2, .mod-faq h2, .related-mods h2 {
  font-size: 1.25rem;
  color: var(--text-heading);
  margin-bottom: 1rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.75rem;
}
.gallery-grid a {
  aspect-ratio: 3/2;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-grid a:hover img { transform: scale(1.05); }

/* Description */
.description-content p { margin-bottom: 0.75rem; line-height: 1.7; }

/* Review */
.review-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.review-rating {
  text-align: center;
  min-width: 80px;
}
.big-stars { font-size: 1.5rem; }
.review-rating span { display: block; color: var(--accent); font-weight: 700; }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.stats-grid div {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.stats-grid dt {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}
.stats-grid dd {
  color: var(--text-heading);
  font-weight: 600;
}

/* Install Guide */
.install-content { line-height: 1.7; }
.install-content h3 { font-size: 1rem; color: var(--text-heading); margin: 1rem 0 0.5rem; }
.install-content li { margin-left: 1.5rem; margin-bottom: 0.25rem; }
.install-content code {
  background: var(--bg-elevated);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent);
}

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 0.95rem;
  user-select: none;
}
.faq-item summary:hover { background: var(--bg-elevated); }
.faq-item p {
  padding: 0 1rem 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Hub FAQ */
.hub-faq, .category-faq, .popular-mods {
  margin: 2rem 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.hub-faq h2, .category-faq h2, .popular-mods h2 {
  font-size: 1.25rem;
  color: var(--text-heading);
  margin-bottom: 1rem;
}

/* Placeholder */
.placeholder-note { color: var(--text-muted); font-style: italic; font-size: 0.9rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .home-hero h1 { font-size: 1.75rem; }
  .home-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .gta6-articles { grid-template-columns: 1fr; }
  .category-cards { grid-template-columns: 1fr; }
  .mod-grid-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .main-nav { gap: 1rem; }
  .main-nav a { font-size: 0.8rem; }
  .review-card { flex-direction: column; }
  .mod-hero-meta { flex-direction: column; gap: 0.25rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .home-cat-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .site-header { padding: 0 1rem; }
}
