:root {
  --bg: #0f1117;
  --panel: #171a23;
  --panel-2: #1f2430;
  --text: #f7f3ea;
  --muted: #b5afa3;
  --accent: #c9a96b;
  --accent-2: #f2d18a;
  --border: rgba(255, 255, 255, 0.08);
  --success-bg: rgba(76, 175, 80, 0.12);
  --success-text: #b8f5bb;
  --error-bg: rgba(217, 107, 107, 0.12);
  --error-text: #ffb8b8;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(201, 169, 107, 0.14), transparent 30%),
    linear-gradient(180deg, #0a0c10 0%, #12151d 100%);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  background: linear-gradient(135deg, rgba(201, 169, 107, 0.16), rgba(28, 31, 41, 0.92));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: var(--accent-2);
}

.hero h1,
.panel h2,
.race-content h3 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 12px;
}

.hero-text,
.muted,
.meta-list,
.field small,
.empty-state {
  color: var(--muted);
}

.hero-text {
  margin: 0;
  max-width: 780px;
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: rgba(23, 26, 35, 0.88);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.sticky-panel {
  position: sticky;
  top: 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.field,
.field-row {
  margin-bottom: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--text);
  padding: 13px 14px;
  font-size: 0.98rem;
}

.field input:focus {
  outline: 2px solid rgba(201, 169, 107, 0.4);
  border-color: rgba(201, 169, 107, 0.4);
}

.field small {
  display: block;
  margin-top: 8px;
  line-height: 1.5;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  color: #1b1307;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.alert {
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.alert-error {
  background: var(--error-bg);
  color: var(--error-text);
}

.empty-state {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
  padding: 28px;
  text-align: center;
}

.race-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.race-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.race-card video {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #000;
}

.race-content {
  padding: 16px;
}

.race-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 107, 0.25);
  background: rgba(201, 169, 107, 0.14);
  color: var(--accent-2);
  font-size: 0.78rem;
  padding: 6px 10px;
  white-space: nowrap;
}

.meta-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(100% - 20px, 1180px);
  }
}
