/* ============================================
   Mixtape Trophy Guide - SEO Optimized Styles
   ============================================ */

/* CSS Custom Properties */
:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-hover: #1f2b4d;
  --accent-primary: #e94560;
  --accent-secondary: #ff6b6b;
  --accent-gold: #ffd700;
  --accent-silver: #c0c0c0;
  --accent-bronze: #cd7f32;
  --text-primary: #f1f1f1;
  --text-secondary: #b8b8d1;
  --text-muted: #7a7a9e;
  --border-color: #2a2a4a;
  --success: #4ecca3;
  --warning: #ffc107;
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', Consolas, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
  --max-width: 1200px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); margin-top: 2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus {
  color: var(--accent-secondary);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Skip Link (Accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.site-header {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover { text-decoration: none; color: var(--text-primary); }

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  text-decoration: none;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #1f1f3a 50%, var(--bg-primary) 100%);
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.hero h1 {
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--text-primary), var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.meta-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-badge .value {
  color: var(--accent-primary);
  font-weight: 700;
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent-primary); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
  color: var(--accent-primary);
}

/* Roadmap Steps */
.roadmap {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.roadmap-step {
  display: flex;
  gap: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
}

.step-number {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.step-content h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Trophy Table */
.trophy-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.trophy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.trophy-table caption {
  text-align: left;
  padding: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.trophy-table th,
.trophy-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.trophy-table th {
  background: var(--bg-secondary);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.trophy-table tbody tr:hover {
  background: var(--bg-hover);
}

.trophy-table tbody tr:last-child td {
  border-bottom: none;
}

/* Trophy Rarity Colors */
.trophy-platinum { color: var(--accent-gold); font-weight: 700; }
.trophy-gold { color: #ffcc00; font-weight: 700; }
.trophy-silver { color: var(--accent-silver); font-weight: 700; }
.trophy-bronze { color: var(--accent-bronze); font-weight: 700; }

.trophy-name {
  font-weight: 700;
  color: var(--text-primary);
}

.trophy-type {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.type-story {
  background: rgba(78, 204, 163, 0.15);
  color: var(--success);
}

.type-missable {
  background: rgba(233, 69, 96, 0.15);
  color: var(--accent-primary);
}

.type-challenge {
  background: rgba(255, 193, 7, 0.15);
  color: var(--warning);
}

/* Chapter List */
.chapter-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.chapter-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.chapter-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  min-width: 50px;
  text-align: center;
}

.chapter-info h4 {
  margin: 0 0 0.25rem;
}

.chapter-info p {
  margin: 0;
  font-size: 0.9rem;
}

.chapter-trophies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chapter-trophy-tag {
  background: var(--bg-hover);
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
}

.faq-question:hover {
  background: var(--bg-hover);
}

.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--accent-primary);
  transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
  text-decoration: none;
  color: white;
}

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--border-color);
  text-decoration: none;
  color: var(--text-primary);
}

/* Quick Links */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.quick-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}

.quick-link-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.quick-link-card a {
  color: var(--text-primary);
  text-decoration: none;
}

.quick-link-card a:hover {
  color: var(--accent-primary);
}

.quick-link-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
}

/* Table of Contents */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.toc ul {
  list-style: none;
  columns: 2;
  column-gap: 2rem;
}

.toc li {
  margin-bottom: 0.5rem;
  break-inside: avoid;
}

.toc a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.toc a:hover {
  color: var(--accent-primary);
}

/* Trophy Detail Section */
.trophy-detail {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 1.5rem;
  scroll-margin-top: 90px;
}

.trophy-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.trophy-detail-header h3 {
  margin: 0;
  flex: 1;
}

.trophy-rarity-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

li { margin-bottom: 0.5rem; }

/* Keyboard styling */
kbd {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--text-primary);
}

/* Blockquote / Tip */
.tip-box {
  background: rgba(78, 204, 163, 0.1);
  border-left: 4px solid var(--success);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1rem 0;
}

.tip-box.warning {
  background: rgba(255, 193, 7, 0.1);
  border-left-color: var(--warning);
}

.tip-box.danger {
  background: rgba(233, 69, 96, 0.1);
  border-left-color: var(--accent-primary);
}

.tip-box p:last-child { margin-bottom: 0; }
.tip-box strong { color: var(--text-primary); }

/* Platform Tags */
.platform-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.platform-tag {
  background: var(--bg-hover);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: var(--shadow);
  z-index: 999;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
  background: var(--accent-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 2.5rem 0;
  }

  .roadmap-step {
    flex-direction: column;
    gap: 1rem;
  }

  .chapter-item {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .toc ul {
    columns: 1;
  }

  .trophy-table th,
  .trophy-table td {
    padding: 0.75rem;
  }

  .quick-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .container {
    padding: 0 1rem;
  }

  .card {
    padding: 1rem;
  }

  .trophy-detail {
    padding: 1.25rem;
  }
}

/* Print styles */
@media print {
  .site-header,
  .scroll-top,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .card,
  .trophy-detail,
  .chapter-item {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}

/* 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;
  }
}

/* Visually hidden (screen readers only) */
.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;
}
