:root {
  --bg: #07141e;
  --bg-soft: #0d2230;
  --panel: rgba(10, 27, 38, 0.82);
  --panel-strong: rgba(8, 22, 31, 0.94);
  --line: rgba(149, 195, 126, 0.16);
  --text: #f7f4ed;
  --muted: #bfd4c6;
  --muted-soft: #8ea699;
  --accent: #ffd584;
  --field: rgba(255, 244, 221, 0.08);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 190, 92, 0.18), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(59, 135, 89, 0.24), transparent 22%),
    linear-gradient(180deg, #05111a 0%, #081a24 46%, #091a18 100%);
  font-family: "Noto Sans SC", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.background-glow {
  position: fixed;
  inset: auto;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.background-glow--top {
  top: -8rem;
  left: -10rem;
  background: rgba(255, 184, 77, 0.16);
}

.background-glow--bottom {
  right: -8rem;
  bottom: -10rem;
  background: rgba(88, 184, 121, 0.14);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.panel {
  background:
    linear-gradient(135deg, rgba(255, 214, 134, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 100%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.35fr 1fr;
  padding: 32px;
}

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

.hero h1,
.section-heading h2,
.empty-state h3 {
  margin: 0;
  font-family: "Noto Serif SC", serif;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.9rem);
  line-height: 1.08;
  max-width: 11ch;
}

.hero__lead {
  margin: 16px 0 0;
  max-width: 55ch;
  color: var(--muted);
  line-height: 1.8;
}

.hero__controls,
.hero__actions,
.control-stack,
.field,
.timeline,
.ai-panel,
.empty-state {
  display: grid;
  gap: 12px;
}

.upload-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255, 212, 132, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px dashed rgba(255, 212, 132, 0.4);
  border-radius: 22px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.upload-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 212, 132, 0.72);
  background: linear-gradient(180deg, rgba(255, 212, 132, 0.18), rgba(255, 255, 255, 0.04));
}

.upload-card__label {
  font-weight: 700;
}

.upload-card__hint,
.section-note,
.status-note,
.field span,
.summary-card__label,
.fixture-card__meta,
.timeline-row__meta,
.ai-panel__meta,
.empty-state p {
  color: var(--muted-soft);
}

.upload-card input {
  margin-top: 8px;
}

.field select {
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  background: var(--field);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.ghost-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255, 213, 132, 0.14);
  border-color: rgba(255, 213, 132, 0.34);
}

.ghost-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ghost-button--danger:hover:not(:disabled) {
  background: rgba(255, 141, 116, 0.16);
  border-color: rgba(255, 141, 116, 0.44);
}

.status-note {
  margin: 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  line-height: 1.7;
}

.summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.summary-card,
.fixture-card,
.timeline-row {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    rgba(5, 18, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-card {
  padding: 18px 20px;
  border-radius: 22px;
  transform: translateY(14px);
  opacity: 0;
  animation: rise-in 420ms ease forwards;
}

.summary-card__value {
  margin-top: 6px;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 800;
}

.summary-card__detail,
.empty-state p,
.ai-panel__text,
.ai-panel__error {
  line-height: 1.75;
}

.summary-card__detail {
  margin-top: 10px;
  color: var(--muted);
}

.section-block {
  margin-top: 18px;
  padding: 24px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.split-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.fixture-card,
.timeline-row {
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
  transform: translateY(16px);
  opacity: 0;
  animation: rise-in 420ms ease forwards;
}

.fixture-card--today {
  border-color: rgba(255, 213, 132, 0.38);
}

.fixture-card--upcoming {
  border-color: rgba(129, 209, 140, 0.24);
}

.fixture-card--finished {
  border-color: rgba(191, 212, 198, 0.16);
}

.fixture-card--in_progress {
  border-color: rgba(255, 141, 116, 0.36);
}

.fixture-card__meta,
.fixture-card__actions,
.timeline-row__head,
.timeline-row__actions,
.source-list,
.team-row,
.timeline-row__matchup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fixture-card__date {
  font-weight: 700;
  color: var(--text);
}

.fixture-card__badge,
.timeline-badge,
.source-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
}

.fixture-card__badge,
.timeline-badge {
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 700;
}

.badge-finished {
  color: #dfe8df;
  background: rgba(191, 212, 198, 0.12);
}

.badge-upcoming {
  color: #dff4e1;
  background: rgba(129, 209, 140, 0.14);
}

.badge-today {
  color: #ffedc7;
  background: rgba(255, 213, 132, 0.18);
}

.badge-in_progress {
  color: #ffe2da;
  background: rgba(255, 141, 116, 0.16);
}

.fixture-card__teams {
  display: grid;
  gap: 10px;
}

.team-row {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.team-row__name {
  font-weight: 700;
}

.team-row__name--watched {
  color: var(--accent);
}

.team-row__side,
.timeline-row__separator {
  color: var(--muted-soft);
  font-size: 0.84rem;
}

.ai-panel {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-panel__text {
  margin: 0;
  white-space: pre-wrap;
  color: var(--muted);
}

.ai-panel__error {
  margin: 0;
  color: #ffd0c4;
}

.source-link {
  min-height: 34px;
  padding: 0 12px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.84rem;
}

.source-link:hover {
  background: rgba(255, 213, 132, 0.14);
}

.timeline-row__matchup {
  font-weight: 700;
}

.empty-state {
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

@keyframes rise-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

  .hero {
    padding: 24px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    padding-top: 20px;
  }

  .panel,
  .section-block,
  .hero {
    border-radius: 24px;
  }

  .hero h1 {
    max-width: none;
  }

  .section-block {
    padding: 18px;
  }

  .fixture-card,
  .timeline-row,
  .summary-card {
    padding: 16px;
  }
}
