/* Category Pages - Shared Styles */

:root {
  --primary: #f7931a;
  --primary-dark: #e8850f;
  --accent: #ffd700;
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a25;
  --text: #ffffff;
  --text-muted: #8888aa;
  --border: #2a2a3a;
  --success: #00ff88;
  --danger: #ff4444;
  
  /* Category-specific colors */
  --rivalry-primary: #ff4444;
  --rivalry-secondary: #4444ff;
  --reality-primary: #00ff88;
  --reality-secondary: #ff4444;
  --copypasta-primary: #9944ff;
  --wildcard-primary: #ff44ff;
  --original-primary: #44ffff;
  --variation-primary: #ffaa00;
  --trending-primary: #ff6b6b;
}

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

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Background */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(247, 147, 26, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 147, 26, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.logo-text {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

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

/* Main Content */
main {
  position: relative;
  z-index: 1;
  padding-top: 80px;
}

/* Hero Section */
.hero {
  padding: 6rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background: radial-gradient(ellipse at center top, var(--category-color, var(--primary)) 0%, transparent 60%);
  opacity: 0.15;
  pointer-events: none;
}

.hero-icon {
  font-size: 5rem;
  margin-bottom: 1.5rem;
  display: block;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text), var(--category-color, var(--primary)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Sections */
.section {
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.section-alt {
  background: var(--bg-card);
  max-width: 100%;
  padding: 4rem 2rem;
}

.section-alt .section-inner {
  max-width: 900px;
  margin: 0 auto;
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.section h3 {
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  color: var(--category-color, var(--primary));
}

.section p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.section strong {
  color: var(--text);
}

/* Code/Format Blocks */
.format-block {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  overflow-x: auto;
}

.format-block code {
  color: var(--accent);
}

/* Feature List */
.feature-list {
  list-style: none;
  margin: 1.5rem 0;
}

.feature-list li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.feature-list li:last-child {
  border-bottom: none;
}

.feature-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--category-color, var(--primary));
  font-weight: bold;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--text);
  font-weight: 600;
  background: var(--bg-dark);
}

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

.data-table tr:hover td {
  background: var(--bg-card-hover);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.stat-card .value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--category-color, var(--primary));
  margin-bottom: 0.5rem;
}

.stat-card .label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* FAQ */
.faq {
  margin: 2rem 0;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--category-color, var(--primary));
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s;
  color: var(--text-muted);
}

.faq-item.open .faq-answer {
  padding: 0 1.5rem 1.5rem;
  max-height: 500px;
}

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  font-size: 1rem;
}

.btn-primary {
  background: var(--category-color, var(--primary));
  color: var(--bg-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(247, 147, 26, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--category-color, var(--primary));
  color: var(--category-color, var(--primary));
}

/* Callout Box */
.callout {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  border-left: 4px solid var(--category-color, var(--primary));
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.callout p {
  margin: 0;
  color: var(--text);
}

/* Visual Split (for rivalry) */
.vs-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  font-size: 1.5rem;
  font-weight: bold;
}

.vs-side {
  padding: 1.5rem 2.5rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.vs-side.left {
  background: var(--rivalry-primary);
}

.vs-side.right {
  background: var(--rivalry-secondary);
}

.vs-divider {
  font-size: 2rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(10px);
  z-index: 99;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: color 0.2s, transform 0.2s;
}

.mobile-nav a:hover {
  color: var(--primary);
}

.mobile-nav a:active {
  transform: scale(0.95);
}

.mobile-nav a.active {
  color: var(--primary);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  
  .header {
    padding: 1rem;
  }
  
  .header-inner {
    position: relative;
  }
  
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 4rem 1rem 3rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .section {
    padding: 2rem 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
}
