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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background: #0b0b14;
}

nav {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid #2a2a3a;
  flex-wrap: wrap;
  background: #0f0f1ae0;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
}

nav a { color: #a0a0b0; text-decoration: none; font-weight: 500; font-size: 15px; padding: 4px 0; }
nav a:hover { color: #ff6b35; }
.logo { font-size: 20px; font-weight: 700; color: #ff6b35 !important; margin-right: auto; }
.logo span { color: #e0e0e0; }

/* ── Hero Banner ── */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  background: linear-gradient(135deg, #1a0a20 0%, #0f1a2e 40%, #1a1a0a 70%, #1a0a10 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255,107,53,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0,150,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255,200,0,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.hero h1 { font-size: 40px; color: #fff; position: relative; }
.hero p  { font-size: 18px; color: #a0a0b0; max-width: 600px; margin: 12px auto 0; position: relative; }

/* ── Section Banner ── */
.section-banner {
  padding: 50px 24px; text-align: center; position: relative;
}
.section-banner.cars  { background: linear-gradient(135deg, #1a0a10 0%, #1a100a 100%); }
.section-banner.map   { background: linear-gradient(135deg, #0a1a10 0%, #0a101a 100%); }
.section-banner.specs  { background: linear-gradient(135deg, #0a0a1a 0%, #1a0a1a 100%); }
.section-banner.guides { background: linear-gradient(135deg, #1a1a0a 0%, #1a0a1a 100%); }
.section-banner h1 { font-size: 36px; color: #fff; position: relative; }
.section-banner p  { color: #a0a0b0; max-width: 600px; margin: 8px auto 0; position: relative; }

/* ── Content Wrapper ── */
.content { max-width: 1040px; margin: 0 auto; padding: 0 24px 40px; }

/* ── Typography ── */
h1 { font-size: 32px; margin: 30px 0 15px; color: #fff; }
h2 { font-size: 22px; margin: 36px 0 14px; color: #f0f0f0; border-left: 3px solid #ff6b35; padding-left: 12px; }
h3 { font-size: 17px; margin: 16px 0 8px; color: #d0d0d0; display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 28px; height: 28px; flex-shrink: 0; }
p  { margin: 10px 0; }
a  { color: #ff6b35; }

/* ── Card Grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0 40px;
  align-items: stretch;
}
.card-grid > .info-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-grid > .info-card .info-card-head {
  flex-shrink: 0;
  min-height: 68px;
  display: flex;
  align-items: center;
}
.card-grid > .info-card .info-card-body {
  flex: 1;
}

/* Card as clickable link — the entire card is an <a> */
a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}
a.card:hover { border-color: #ff6b35; transform: translateY(-2px); }

.img-placeholder {
  width: 100%;
  height: 200px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  overflow: hidden;
}
.img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.img-placeholder.news   { background: linear-gradient(135deg, #2a1a3a, #1a2a3a); }
.img-placeholder.cars   { background: linear-gradient(135deg, #3a1a1a, #1a1a2a); }
.img-placeholder.map    { background: linear-gradient(135deg, #1a3a1a, #1a2a3a); }
.img-placeholder.specs  { background: linear-gradient(135deg, #1a1a3a, #2a1a2a); }

.card-body { padding: 18px 20px; }
.card-body h3 { margin-top: 0; font-size: 17px; color: #ff6b35; }
.card-body p  { color: #a0a0b0; }

.tag {
  display: inline-block;
  background: rgba(255,107,53,0.15);
  color: #ff6b35;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  margin-bottom: 6px;
}

.breadcrumb { color: #666; font-size: 14px; margin: 16px 0; }
.breadcrumb a { color: #888; }

/* ── Quick Facts (homepage, not clickable) ── */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 40px;
}
.fact-item {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}
.fact-item .fact-icon  { font-size: 28px; margin-bottom: 8px; }
.fact-item .fact-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.fact-item .fact-value { font-size: 18px; color: #fff; font-weight: 600; }

/* ── Region Cards (Map page) ── */
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 20px 0 40px;
}
a.region-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}
a.region-card:hover { border-color: #ff6b35; transform: translateY(-2px); }

.region-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  overflow: hidden;
}
.region-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.region-img.coastal { background: linear-gradient(135deg, #1a3a4a, #0a2a3a); }
.region-img.mountain { background: linear-gradient(135deg, #2a2a3a, #1a1a2a); }
.region-img.urban    { background: linear-gradient(135deg, #3a2a3a, #2a1a2a); }
.region-img.desert   { background: linear-gradient(135deg, #3a3a1a, #2a2a0a); }
.region-img.forest   { background: linear-gradient(135deg, #1a3a1a, #0a2a0a); }
.region-img.hub      { background: linear-gradient(135deg, #3a1a1a, #2a0a0a); }

.region-body { padding: 16px 18px; }
.region-body h3 { color: #ff6b35; margin-top: 0; }
.region-body p  { color: #a0a0b0; }

/* ── Specs Tier Cards ── */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0 40px;
}
.spec-card {
  border-radius: 10px;
  overflow: hidden;
}
.spec-card.minimum  { background: linear-gradient(135deg, #2a2a1a, #1a2a1a); border: 1px solid #3a3a2a; }
.spec-card.rec      { background: linear-gradient(135deg, #2a1a2a, #1a1a2a); border: 1px solid #3a2a3a; }
.spec-card.ultra    { background: linear-gradient(135deg, #1a1a2a, #1a2a2a); border: 1px solid #2a3a3a; }
.spec-card .spec-header {
  padding: 14px 18px;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  text-align: center;
}
.spec-card.minimum .spec-header  { background: #3a3a1a; }
.spec-card.rec .spec-header      { background: #3a1a3a; }
.spec-card.ultra .spec-header    { background: #1a3a3a; }
.spec-card .spec-body { padding: 14px 18px; }
.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}
.spec-row .label { color: #888; }
.spec-row .val   { color: #e0e0e0; font-weight: 500; text-align: right; }

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 40px;
  font-size: 14px;
}
th {
  background: #14142a;
  color: #ff6b35;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid #252540;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
td { padding: 12px 16px; border-bottom: 1px solid #1a1a30; }
tr:hover td { background: #14142a; }

/* ── Lists ── */
ul, ol { margin: 10px 0 10px 24px; }
li { margin: 6px 0; }

/* ── Race Types Grid (Guides page) ── */
.race-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 16px 0 32px;
}
.race-type-card {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 8px;
  padding: 18px;
}
.race-type-card h3 { color: #ff6b35; margin-top: 0; }
.race-type-card p  { color: #a0a0b0; margin: 6px 0; font-size: 14px; }
.rt-icon { display: block; margin-bottom: 8px; }
.rt-icon svg { width: 32px; height: 32px; display: block; }
.rt-tag {
  display: inline-block;
  background: rgba(255,107,53,0.12);
  color: #ff6b35;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 12px;
  margin-top: 8px;
}

/* ── Guide Quick-Jump Nav ── */
.guide-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 28px 0 40px;
}
a.guide-nav-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  padding: 20px 22px;
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
}
a.guide-nav-card:hover {
  border-color: #ff6b35;
  transform: translateY(-2px);
  background: #181835;
}
.guide-nav-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255,107,53,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.guide-nav-icon svg {
  width: 26px;
  height: 26px;
}
.guide-nav-label {
  font-size: 16px;
  font-weight: 600;
  color: #e0e0e0;
  line-height: 1.3;
}
.guide-nav-label small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: #888;
  margin-top: 2px;
}

/* ── Info Cards ── */
.info-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 16px 0 24px;
}
.info-card-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.info-card {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  overflow: hidden;
}
.content > .info-card + .info-card { margin-top: 16px; }
.card-grid + .info-card { margin-top: 16px; }
.info-card + .card-grid { margin-top: 16px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr) !important; }
.card-grid-2 { grid-template-columns: repeat(2, 1fr) !important; }
.info-card-head {
  background: #1a1a35;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.info-card-head svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.info-card-body { padding: 14px 16px; }
.info-card-body p { margin-top: 0; color: #a0a0b0; font-size: 14px; }

.kv-row {
  display: flex;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  color: #b0b0b0;
  line-height: 1.5;
}
.kv-row:last-child { border-bottom: none; }
.kv-row span {
  flex-shrink: 0;
  min-width: 90px;
  font-weight: 600;
  color: #e0e0e0;
  font-size: 12px;
}
.kv-row.highlight { color: #ff6b35; font-weight: 600; }
.kv-row.highlight span { color: #ff6b35; }

/* ── Compact Table ── */
table.compact th { font-size: 11px; padding: 8px 10px; }
table.compact td { font-size: 13px; padding: 7px 10px; }
td.cr { color: #4caf50; font-weight: 600; }
td.xp { color: #ff6b35; font-weight: 600; }
td.hl { color: #ff6b35; font-weight: 600; }
td.highlight-row { background: rgba(255,107,53,0.08); }
tr.highlight-row td { color: #ff6b35; font-weight: 600; }

/* ── Tier List Grid ── */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 20px 0 32px;
}
.tier-card {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
}
.tier-card.tier-s2 { border-top: 3px solid #e91e63; }
.tier-card.tier-s1 { border-top: 3px solid #ff9800; }
.tier-card.tier-a  { border-top: 3px solid #2196f3; }
.tier-card.tier-b  { border-top: 3px solid #4caf50; }
.tier-badge {
  font-size: 28px;
  font-weight: 800;
  padding: 16px 0 4px;
}
.tier-s2 .tier-badge { color: #e91e63; }
.tier-s1 .tier-badge { color: #ff9800; }
.tier-a  .tier-badge { color: #2196f3; }
.tier-b  .tier-badge { color: #4caf50; }
.tier-range { font-size: 13px; color: #888; margin-bottom: 2px; }
.tier-label { font-size: 12px; color: #ff6b35; font-weight: 600; text-transform: uppercase; margin-bottom: 10px; }
.tier-table { width: 100%; border-collapse: collapse; margin: 0; }
.tier-table th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  color: #888;
}
.tier-table td { font-size: 12px; padding: 5px 10px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.tier-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Beginner Tips Grid ── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0 32px;
}
a.tip-card {
  display: flex;
  gap: 14px;
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  padding: 18px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
}
a.tip-card:hover { border-color: #ff6b35; transform: translateY(-2px); }
.tip-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,107,53,0.15);
  color: #ff6b35;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.tip-text { font-size: 14px; color: #a0a0b0; line-height: 1.6; }
.tip-text strong { color: #e0e0e0; }

/* ── Tuning Grid ── */
.tuning-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 16px 0 24px;
}
.tuning-card {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  padding: 18px;
}
.tuning-card h3 { color: #ff6b35; font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.tuning-card h3 svg { width: 20px; height: 20px; flex-shrink: 0; }
.tuning-card .kv-row span {
  display: block;
  font-weight: 600;
  color: #d0d0d0;
  font-size: 12px;
  margin-bottom: 1px;
}
.tuning-card .kv-row.tip { color: #ff6b35; }
.tuning-card .kv-row.tip span { color: #ff6b35; }

/* ── Vehicle Detail Page ── */
.vehicle-hero {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin: 32px 0;
  flex-wrap: wrap;
}
.vehicle-hero-img {
  flex: 0 0 400px;
  max-width: 100%;
  aspect-ratio: 800 / 520;
  background: linear-gradient(135deg, #1a1a30, #14142a);
  border: 1px solid #252540;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  overflow: hidden;
}
.vehicle-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.vehicle-hero-info {
  flex: 1;
  min-width: 280px;
}
.vehicle-hero-info h1 {
  margin-top: 0;
  font-size: 34px;
}
.vehicle-hero-info .subtitle {
  color: #888;
  font-size: 16px;
  margin-bottom: 20px;
}
.vehicle-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.vehicle-stat {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.vehicle-stat .stat-val {
  font-size: 20px;
  font-weight: 700;
  color: #ff6b35;
}
.vehicle-stat .stat-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.pro-con-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 32px;
}
.pro-con {
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 10px;
  padding: 18px;
}
.pro-con h3 { margin-top: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pro-con.pros h3 { color: #4caf50; }
.pro-con.cons h3 { color: #f44336; }
.pro-con ul { margin: 8px 0 0 20px; }
.pro-con li { color: #a0a0b0; font-size: 14px; margin: 4px 0; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 40px;
}
a.related-card {
  display: block;
  text-decoration: none;
  background: #14142a;
  border: 1px solid #252540;
  border-radius: 8px;
  padding: 16px;
  transition: border-color 0.2s, transform 0.15s;
  color: inherit;
}
a.related-card:hover { border-color: #ff6b35; transform: translateY(-2px); }
.related-card h4 { color: #ff6b35; font-size: 14px; margin: 0 0 4px; }
.related-card p { color: #888; font-size: 12px; margin: 0; }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 30px 0;
  border-top: 1px solid #2a2a3a;
  margin-top: 50px;
  color: #555;
  font-size: 13px;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .guide-nav { grid-template-columns: repeat(2, 1fr); }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  h1 { font-size: 24px; }
  .hero { padding: 50px 16px 40px; }
  .hero h1 { font-size: 28px; }
  .card-grid, .region-grid, .quick-facts, .specs-grid { grid-template-columns: 1fr; }
  .card-grid-3, .card-grid-2 { grid-template-columns: 1fr !important; }
  .guide-nav { grid-template-columns: 1fr; }
  a.guide-nav-card { padding: 14px 16px; gap: 12px; }
  .guide-nav-icon { width: 40px; height: 40px; border-radius: 10px; }
  .guide-nav-icon svg { width: 22px; height: 22px; }
  .guide-nav-label { font-size: 14px; }
  .info-card-grid, .info-card-grid.three-col { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .tuning-grid { grid-template-columns: 1fr; }
  .race-types-grid { grid-template-columns: 1fr; }
  nav { gap: 12px; padding: 12px 16px; }
}
