:root {
  --bg: #0b1020;
  --bg-elev: #111a30;
  --panel: #151f3b;
  --panel-soft: #1c294a;
  --line: #2c426e;
  --text: #edf3ff;
  --text-muted: #a7b8d6;
  --accent-cyan: #12e7ff;
  --accent-orange: #ff8a1c;
  --accent-red: #ff536b;
  --success: #31d28f;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  --content-width: min(1180px, 92vw);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Rajdhani', 'Inter', 'Segoe UI', sans-serif;
  background:
    linear-gradient(180deg, rgba(6, 10, 21, 0.88), rgba(8, 13, 25, 0.95)),
    url('/assets/images/bg8.jpg') center / cover no-repeat fixed,
    linear-gradient(135deg, rgba(18, 231, 255, 0.07) 0%, transparent 24%),
    radial-gradient(circle at 85% -10%, rgba(255, 138, 28, 0.2) 0%, transparent 35%),
    repeating-linear-gradient(
      120deg,
      rgba(17, 26, 48, 0.9) 0,
      rgba(17, 26, 48, 0.9) 16px,
      rgba(11, 16, 32, 0.95) 16px,
      rgba(11, 16, 32, 0.95) 32px
    ),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

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

.container {
  width: var(--content-width);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(18, 231, 255, 0.26);
  background: rgba(7, 11, 22, 0.92);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  width: var(--content-width);
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

.brand__dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  transform: rotate(45deg);
  background: linear-gradient(180deg, var(--accent-cyan), #0aa4ff);
  box-shadow: 0 0 16px rgba(18, 231, 255, 0.8);
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
  border: 1px solid rgba(167, 184, 214, 0.2);
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 13px;
  clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
  transition: 180ms ease;
}

.main-nav a[aria-current='page'],
.main-nav a:hover {
  color: var(--text);
  border-color: rgba(18, 231, 255, 0.65);
  box-shadow: 0 0 18px rgba(18, 231, 255, 0.22);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 11px 16px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(180deg, #ffab4e, var(--accent-orange));
  border-color: #ffc889;
  color: #241000;
  box-shadow: 0 7px 18px rgba(255, 138, 28, 0.34);
}

.btn--ghost {
  border-color: rgba(18, 231, 255, 0.5);
  color: var(--accent-cyan);
  background: rgba(18, 231, 255, 0.08);
}

.hero {
  padding: 44px 0 24px;
}

.garage-hero {
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.05fr 0.95fr;
}

.console {
  border: 1px solid rgba(167, 184, 214, 0.25);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(18, 29, 54, 0.95), rgba(11, 16, 32, 0.98));
  padding: 20px;
  box-shadow: var(--shadow);
}

.console__tag {
  display: inline-flex;
  color: var(--accent-cyan);
  border: 1px solid rgba(18, 231, 255, 0.55);
  padding: 4px 10px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.console h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 4vw, 60px);
  line-height: 1.03;
}

.console p {
  margin: 0 0 18px;
  color: var(--text-muted);
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.dash-metrics {
  display: grid;
  gap: 8px;
}

.dash-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.dash-row span {
  color: var(--text-muted);
}

.meter {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value, 50%);
  background: linear-gradient(90deg, rgba(18, 231, 255, 0.9), rgba(255, 138, 28, 0.9));
}

.hud-stage {
  border: 1px solid rgba(18, 231, 255, 0.28);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(20, 30, 56, 0.92), rgba(9, 13, 24, 0.98));
  padding: 12px;
  position: relative;
  box-shadow: var(--shadow);
}

.hud-stage__media {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(167, 184, 214, 0.34);
  position: relative;
}

.hud-stage__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 28, 0) 40%, rgba(10, 14, 28, 0.72) 100%);
}

.hero-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hud-overlay {
  position: absolute;
  inset: auto 10px 10px 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hud-box {
  border: 1px solid rgba(167, 184, 214, 0.35);
  background: rgba(8, 12, 22, 0.84);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.hud-box span {
  color: var(--text-muted);
  font-size: 12px;
  display: block;
}

.hud-box strong {
  font-size: 21px;
  line-height: 1;
}

.section {
  padding: 24px 0;
}

.section__title {
  margin: 0 0 6px;
  font-size: clamp(24px, 2.2vw, 34px);
}

.section__lead {
  margin: 0 0 14px;
  color: var(--text-muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stat {
  border: 1px solid rgba(167, 184, 214, 0.22);
  border-radius: var(--radius-md);
  padding: 12px;
  background: linear-gradient(180deg, rgba(20, 31, 57, 0.82), rgba(10, 14, 26, 0.94));
}

.stat__num {
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.stat__label {
  color: var(--text-muted);
  font-weight: 600;
}

.panel {
  border: 1px solid rgba(167, 184, 214, 0.22);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: linear-gradient(180deg, rgba(18, 28, 53, 0.82), rgba(10, 14, 26, 0.95));
}

.card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.task-card {
  border: 1px solid rgba(167, 184, 214, 0.24);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(18, 27, 50, 0.94), rgba(9, 14, 26, 0.98));
  overflow: hidden;
  position: relative;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.task-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-orange));
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 231, 255, 0.6);
  box-shadow: 0 0 18px rgba(18, 231, 255, 0.18);
}

.task-card__body {
  padding: 12px 14px 14px;
}

.task-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}

.badge {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.badge--cat {
  color: var(--accent-cyan);
  border-color: rgba(18, 231, 255, 0.5);
  background: rgba(18, 231, 255, 0.1);
}

.badge--level {
  color: #ffd8b1;
  border-color: rgba(255, 138, 28, 0.5);
  background: rgba(255, 138, 28, 0.15);
}

.task-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.18;
}

.task-card p {
  margin: 0;
  color: var(--text-muted);
}

.task-card__objective {
  margin-top: 10px;
  border-top: 1px solid rgba(167, 184, 214, 0.2);
  padding-top: 8px;
  color: var(--text);
  font-size: 14px;
}

.latest-list {
  margin: 0;
  padding-left: 18px;
}

.latest-list li {
  margin-bottom: 6px;
}

.game-layout {
  width: var(--content-width);
  margin: 26px auto;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.game-box {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(18, 231, 255, 0.34);
  padding: 14px;
  background: linear-gradient(180deg, rgba(18, 28, 53, 0.95), rgba(9, 13, 24, 0.98));
}

.game-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.game-header h1 {
  margin: 0;
  font-size: clamp(30px, 3.3vw, 44px);
  line-height: 1.06;
}

.game-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.race-actions {
  display: flex;
  gap: 8px;
}

.game-frame-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(167, 184, 214, 0.34);
  aspect-ratio: 16 / 9;
  background: #05080f;
  position: relative;
}

.game-frame {
  width: 100%;
  height: 100%;
  border: 0;
  transform: rotate(0deg);
  transform-origin: center center;
}

.game-frame.is-rotated {
  transform: rotate(180deg);
}

.countdown-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 16, 0.45);
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 26px rgba(18, 231, 255, 0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.countdown-overlay.is-active {
  opacity: 1;
}

.hud-side {
  display: grid;
  gap: 10px;
}

.hud-panel {
  border: 1px solid rgba(167, 184, 214, 0.25);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.hud-panel h2,
.hud-panel h3 {
  margin: 0 0 6px;
}

.hud-panel ul {
  margin: 0;
  padding-left: 18px;
}

.hud-panel li {
  margin-bottom: 5px;
}

.preview-carousel {
  border: 1px solid rgba(167, 184, 214, 0.26);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(8, 13, 24, 0.68);
}

.preview-track {
  position: relative;
  min-height: 160px;
}

.preview-slide {
  margin: 0;
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.preview-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.preview-slide img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.preview-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 13, 24, 0.08) 46%, rgba(8, 13, 24, 0.82) 100%);
}

.preview-slide figcaption {
  position: absolute;
  left: 8px;
  bottom: 6px;
  z-index: 1;
  margin: 0;
  color: #dff8ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.preview-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-top: 1px solid rgba(167, 184, 214, 0.22);
  background: rgba(6, 10, 19, 0.78);
}

.preview-nav {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(18, 231, 255, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(18, 231, 255, 0.08);
  color: var(--accent-cyan);
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.preview-nav:hover {
  background: rgba(18, 231, 255, 0.16);
  border-color: rgba(18, 231, 255, 0.72);
  transform: translateY(-1px);
}

.preview-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(167, 184, 214, 0.4);
  cursor: pointer;
  padding: 0;
}

.preview-dot.is-active {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(18, 231, 255, 0.65);
}

.tiny-meter {
  margin-top: 8px;
}

.article-shell {
  width: min(860px, 92vw);
  margin: 28px auto 52px;
}

.breadcrumb {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 15px;
}

.article-header {
  border: 1px solid rgba(18, 231, 255, 0.3);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(20, 31, 56, 0.78), rgba(9, 14, 25, 0.95));
  padding: 18px;
}

.article-header h1 {
  margin: 0 0 10px;
  line-height: 1.1;
  font-size: clamp(30px, 3.2vw, 44px);
  font-family: Orbitron, Rajdhani, sans-serif;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
  font-size: 15px;
}

.article-meta span {
  border: 1px solid rgba(167, 184, 214, 0.26);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.03);
}

.article-cover {
  margin-top: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(167, 184, 214, 0.32);
  overflow: hidden;
}

.article-content {
  margin-top: 20px;
  border: 1px solid rgba(167, 184, 214, 0.24);
  border-radius: var(--radius-md);
  padding: 20px;
  background: rgba(8, 13, 24, 0.88);
}

.article-content h2 {
  margin: 24px 0 10px;
  font-size: 26px;
  line-height: 1.15;
}

.article-content p {
  margin: 0 0 14px;
}

.article-content ul {
  margin: 0 0 18px;
  padding-left: 20px;
}

.article-content li {
  margin-bottom: 6px;
}

.toc {
  border: 1px solid rgba(167, 184, 214, 0.2);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.toc h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.toc ul {
  margin: 0;
  padding-left: 18px;
}

.toc a {
  color: var(--text-muted);
}

.article-content > section {
  border: 1px solid rgba(167, 184, 214, 0.18);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: rgba(255, 255, 255, 0.015);
  margin-bottom: 12px;
}

.site-footer {
  border-top: 1px solid rgba(18, 231, 255, 0.25);
  margin-top: 30px;
  padding: 20px 0;
}

.site-footer__inner {
  width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  color: var(--text-muted);
}

.legal-links {
  display: inline-flex;
  gap: 12px;
}

@media (max-width: 980px) {
  .garage-hero,
  .game-layout {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .site-header__inner {
    min-height: 58px;
  }

  .brand {
    font-size: 17px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .hud-overlay {
    grid-template-columns: 1fr;
  }

  .dash-row {
    grid-template-columns: 100px 1fr auto;
  }

  .preview-track,
  .preview-slide img {
    min-height: 136px;
    height: 136px;
  }
}
