/* ===== SIMRACING HUB - Dark Racing Theme ===== */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --accent-red: #e63946;
  --accent-orange: #ff6b35;
  --accent-yellow: #ffd166;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0b0;
  --text-muted: #666680;
  --border-color: #2a2a3e;
  --gradient-race: linear-gradient(135deg, #e63946, #ff6b35);
  --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
  --shadow-glow: 0 0 20px rgba(230, 57, 70, 0.15);
  --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Rajdhani', 'Inter', sans-serif;
  --max-width: 1200px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== HEADER & NAV ===== */
header {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

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

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--gradient-race);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  letter-spacing: -1px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-text span {
  background: var(--gradient-race);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav { display: flex; align-items: center; gap: 0.25rem; }

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border-color);
}

.lang-switch a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 24px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.5;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.lang-switch a:hover {
  opacity: 0.8;
  background: rgba(230, 57, 70, 0.1);
}

.lang-switch a.active-lang {
  opacity: 1;
  border-color: var(--accent-red);
  background: rgba(230, 57, 70, 0.15);
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

nav a:hover, nav a.active {
  color: var(--text-primary);
  background: rgba(230, 57, 70, 0.1);
}

nav a.active {
  color: var(--accent-red);
  background: rgba(230, 57, 70, 0.15);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ===== HERO ===== */
.hero {
  background: var(--gradient-dark);
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(230, 57, 70, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.hero h1 span {
  background: var(--gradient-race);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.hero-date {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.4rem 1rem;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: 20px;
  color: var(--accent-red);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== MAIN CONTENT ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-header h2 .icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-race);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.section-header p {
  color: var(--text-secondary);
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-race);
  opacity: 0;
  transition: opacity var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(230, 57, 70, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.card:hover::before { opacity: 1; }

.card-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: rgba(230, 57, 70, 0.15);
  color: var(--accent-red);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.card-tag.hardware { background: rgba(255, 107, 53, 0.15); color: var(--accent-orange); }
.card-tag.software { background: rgba(255, 209, 102, 0.15); color: var(--accent-yellow); }
.card-tag.iracing { background: rgba(0, 136, 255, 0.15); color: #0088ff; }
.card-tag.lmu { background: rgba(0, 200, 120, 0.15); color: #00c878; }
.card-tag.sim { background: rgba(160, 100, 255, 0.15); color: #a064ff; }
.card-tag.cas { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

.card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

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

.card-date {
  display: block;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.75rem;
  color: var(--accent-red);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: gap var(--transition);
}

.card-link:hover { gap: 0.6rem; }

/* ===== COMPARISON TABLES ===== */
.comparison-table-wrapper {
  overflow-x: auto;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.comparison-table-wrapper h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 1.25rem 1.5rem 0.5rem;
  color: var(--text-primary);
  border-bottom: none;
}

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.comparison-table thead th {
  background: rgba(230, 57, 70, 0.12);
  color: var(--accent-red);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1.1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid rgba(230, 57, 70, 0.25);
  position: sticky;
  top: 0;
  z-index: 1;
}

.comparison-table tbody td {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid rgba(42, 42, 62, 0.4);
  color: var(--text-secondary);
  white-space: nowrap;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table tbody tr:hover {
  background: rgba(230, 57, 70, 0.06);
}

.comparison-table tbody tr:hover td {
  color: var(--text-primary);
}

.comparison-table tbody td:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

.comparison-table tbody td:nth-child(2) {
  color: var(--text-primary);
  font-weight: 500;
}

.comparison-table .price {
  color: var(--accent-yellow);
  font-weight: 600;
}

/* Tier color bars - applied to first td of each row */
.comparison-table .tier-budget td:first-child { border-left: 4px solid #00c878; padding-left: calc(1.1rem - 1px); }
.comparison-table .tier-mid td:first-child { border-left: 4px solid #0088ff; padding-left: calc(1.1rem - 1px); }
.comparison-table .tier-high td:first-child { border-left: 4px solid var(--accent-orange); padding-left: calc(1.1rem - 1px); }
.comparison-table .tier-pro td:first-child { border-left: 4px solid var(--accent-red); padding-left: calc(1.1rem - 1px); }

/* Tier row subtle background tinting */
.comparison-table .tier-budget { background: rgba(0, 200, 120, 0.03); }
.comparison-table .tier-mid { background: rgba(0, 136, 255, 0.03); }
.comparison-table .tier-high { background: rgba(255, 107, 53, 0.03); }
.comparison-table .tier-pro { background: rgba(230, 57, 70, 0.03); }

.comparison-table .tier-budget:hover { background: rgba(0, 200, 120, 0.08); }
.comparison-table .tier-mid:hover { background: rgba(0, 136, 255, 0.08); }
.comparison-table .tier-high:hover { background: rgba(255, 107, 53, 0.08); }
.comparison-table .tier-pro:hover { background: rgba(230, 57, 70, 0.08); }

.table-legend {
  display: flex;
  gap: 1.5rem;
  padding: 0.6rem 1.5rem 1rem;
  flex-wrap: wrap;
}

.table-legend span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.table-legend span::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-budget::before { background: #00c878 !important; }
.legend-mid::before { background: #0088ff !important; }
.legend-high::before { background: var(--accent-orange) !important; }
.legend-pro::before { background: var(--accent-red) !important; }

@media (max-width: 768px) {
  .comparison-table { font-size: 0.78rem; }
  .comparison-table thead th { padding: 0.6rem 0.75rem; font-size: 0.72rem; }
  .comparison-table tbody td { padding: 0.55rem 0.75rem; }
  .comparison-table-wrapper h3 { font-size: 1.1rem; padding: 1rem 1rem 0.4rem; }
  .table-legend { padding: 0.4rem 1rem 0.75rem; gap: 1rem; }
}

/* ===== HARDWARE SUB-SECTIONS ===== */
.sub-section {
  margin-bottom: 2.5rem;
}

.sub-section h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent-red);
}

/* ===== FEATURE LIST ===== */
.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.feature-list li {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all var(--transition);
}

.feature-list li:hover {
  border-color: rgba(230, 57, 70, 0.3);
}

.feature-list li .bullet {
  width: 8px;
  height: 8px;
  min-width: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  margin-top: 0.45rem;
}

.feature-list li strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.feature-list li span {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ===== QUICK NAV TILES ===== */
.quick-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.quick-nav a {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  text-align: center;
  transition: all var(--transition);
}

.quick-nav a:hover {
  border-color: rgba(230, 57, 70, 0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.quick-nav a .nav-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.quick-nav a .nav-label {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.quick-nav a .nav-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

footer .footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition);
}

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

.last-updated {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0; right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 0.25rem;
  }

  nav.open { display: flex; }

  nav a {
    width: 100%;
    padding: 0.75rem 1rem;
  }

  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    justify-content: center;
  }

  .hero h1 { font-size: 2rem; }
  .card-grid { grid-template-columns: 1fr; }
  .quick-nav { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .quick-nav { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== LOADING ANIMATION ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeInUp 0.5s ease backwards; }
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
