* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: rgba(11, 16, 32, 0.76);
  --panel: rgba(8, 14, 26, 0.78);
  --panel-strong: rgba(13, 22, 40, 0.95);
  --border: rgba(167, 191, 255, 0.14);
  --text: #f4f8ff;
  --muted: #a4b3cf;
  --accent: #6ee7ff;
  --accent-2: #ff6b8b;
  --success: #4ade80;
  --warning: #fbbf24;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(110, 231, 255, 0.18), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 107, 139, 0.15), transparent 30%),
    linear-gradient(180deg, #050a14 0%, #091224 48%, #060b15 100%);
  overflow-x: hidden;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
  pointer-events: none;
  opacity: 0.32;
}

.page-bg {
  position: fixed;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.45;
  pointer-events: none;
}

.page-bg--one {
  top: -120px;
  left: -100px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(110, 231, 255, 0.35) 0%, rgba(110, 231, 255, 0.05) 65%, transparent 75%);
  animation: floatOne 16s ease-in-out infinite;
}

.page-bg--two {
  right: -140px;
  bottom: 2vh;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 107, 139, 0.28) 0%, rgba(255, 107, 139, 0.04) 65%, transparent 75%);
  animation: floatTwo 18s ease-in-out infinite;
}

/* FIX 1: Menggunakan max-width dan padding agar margin tidak meluap */
.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 36px 56px;
}

.panel {
  background: linear-gradient(180deg, rgba(13, 21, 39, 0.88), rgba(8, 13, 24, 0.86));
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  display: grid;
  gap: 28px;
  padding: 28px;
}

.hero__intro {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero__logo-wrap {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(110, 231, 255, 0.2), rgba(255, 107, 139, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero__logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

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

h1,
h2,
.stat__value,
.score,
.team-name,
.week-label,
.anniversary-title {
  font-family: "Oxanium", "Space Grotesk", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.95;
}

.hero__copy {
  margin: 0;
  color: var(--muted);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.stat__label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.stat__value {
  font-size: 1.6rem;
  color: white;
}

/* === STYLE KHUSUS NEXT MATCH === */
.match-card--next {
  border-color: rgba(110, 231, 255, 0.2);
}

.badge--next {
  color: #6ee7ff;
  background: rgba(110, 231, 255, 0.12);
}

.badge--next::before {
  background: var(--accent);
  /* Warna biru cyan */
  animation: pulse-blue 1.6s ease-in-out infinite;
}

@keyframes pulse-blue {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(110, 231, 255, 0.28);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(110, 231, 255, 0);
  }
}

/* === LAYOUT GRID === */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.7fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
  width: 100%;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 24px;
  /* FIX 2: Paksa sidebar bisa menyusut di dalam Grid */
  min-width: 0;
  width: 100%;
}

.schedule-panel,
.sponsor-panel {
  padding: 24px;
}

/* === ANNIVERSARY PANEL === */
.anniversary-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(167, 191, 255, 0.08), rgba(6, 11, 22, 0.95));
  border-color: rgba(110, 231, 255, 0.25);
  /* FIX 3: Anti-bablas kotak Anniversary */
  min-width: 0;
  width: 100%;
}

.anniversary-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: translateX(-100%);
  animation: shimmer 5s infinite;
}

.anniversary-badge {
  background: linear-gradient(90deg, #6ee7ff, #be93c5);
  color: #050a14;
  font-family: "Oxanium", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 8px;
  position: relative;
  z-index: 1;
}

.anniversary-visual {
  position: relative;
  z-index: 1;
  margin: 8px 0;
}

.anniversary-visual img {
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 0 16px rgba(110, 231, 255, 0.2));
}

.fallback-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000;
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.35);
}

.fallback-badge__num {
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.9;
  font-family: "Oxanium", sans-serif;
}

.fallback-badge__text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.anniversary-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  /* Mencegah teks kepanjangan meluap */
  word-break: break-word;
}

.anniversary-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* === MATCH & SCHEDULE === */
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.section-heading__note {
  margin: 0;
  max-width: 34ch;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
}

.section-heading__note span {
  color: var(--accent);
}

.schedule-list {
  display: grid;
  gap: 16px;
}

.week-block {
  display: grid;
  gap: 14px;
}

.week-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px;
}

.week-label {
  margin: 0;
  font-size: 1.15rem;
}

.week-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.match-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.match-card::before {
  content: "";
  position: absolute;
  inset: auto -20% -46% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 231, 255, 0.16), transparent 70%);
}

.match-card--finished {
  border-color: rgba(74, 222, 128, 0.2);
}

.match-card--scheduled {
  border-color: rgba(251, 191, 36, 0.2);
}

.match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.match-id {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.badge--finished {
  color: #95f0b4;
  background: rgba(74, 222, 128, 0.12);
}

.badge--finished::before {
  background: var(--success);
}

.badge--scheduled {
  color: #ffd77c;
  background: rgba(251, 191, 36, 0.12);
}

.badge--scheduled::before {
  background: var(--warning);
  animation: pulse 1.6s ease-in-out infinite;
}

.match-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.team {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.team--away {
  justify-content: flex-end;
  text-align: right;
}

.team__logo {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 18px;
  background: #0f1728;
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.team__meta {
  min-width: 0;
}

.team-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.1;
}

.team-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.versus {
  display: grid;
  place-items: center;
  gap: 6px;
  min-width: 130px;
}

.versus__label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.score {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  color: white;
}

.scheduled-label {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.12);
  color: #ffd77c;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.match-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.match-time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.match-time::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(110, 231, 255, 0.7);
}

/* === MAIN SPONSOR === */
.main-sponsor-container {
  margin-bottom: 20px;
}

.sponsor-item--main {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.08), rgba(8, 13, 24, 0.9));
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: 0 8px 32px rgba(251, 191, 36, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sponsor-item--main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.1), transparent);
  transform: translateX(-100%);
  animation: shimmer 4s infinite;
}

.sponsor-badge {
  z-index: 999;
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--warning);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border-radius: 8px;
}

.sponsor-item--main img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.sponsor-item--main span {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--warning);
  position: relative;
  z-index: 1;
}

/* === MARQUEE === */
.sponsor-panel {
  overflow: hidden;
  /* FIX 4: Anti-bablas kotak Sponsor */
  min-width: 0;
  width: 100%;
}

.marquee {
  overflow: hidden;
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  /* FIX 5: Pastikan track animasi terbatas di dalam layarnya */
  width: 100%;
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}

.marquee::before {
  left: 0;
  background: linear-gradient(90deg, rgba(7, 17, 31, 1), rgba(7, 17, 31, 0));
}

.marquee::after {
  right: 0;
  background: linear-gradient(270deg, rgba(7, 17, 31, 1), rgba(7, 17, 31, 0));
}

.marquee__track {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: max-content;
  padding: 18px;
  animation: marquee 26s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.sponsor-item {
  flex: 0 0 auto;
  width: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 20px;
  background: rgba(8, 13, 24, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.sponsor-item img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.sponsor-item span {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.4;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes floatOne {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(16px, 24px);
  }
}

@keyframes floatTwo {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-18px, -22px);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.28);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(251, 191, 36, 0);
  }
}

@media (min-width: 1024px) {
  .app-shell {
    max-width: none;
  }
}

/* === RESPONSIVE MOBILE FIXES === */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

@media (max-width: 760px) {
  .app-shell {
    /* FIX 6: Menghapus margin horisontal, pakai padding murni untuk memberi nafas */
    margin: 0 auto;
    padding: 24px 16px 32px;
    width: 100%;
  }

  .hero,
  .schedule-panel,
  .anniversary-panel,
  .sponsor-panel {
    max-width: 100%;
    padding: 18px;
    border-radius: 22px;
    overflow: hidden;
  }

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

  .hero__logo-wrap {
    width: 80px;
    height: 80px;
    border-radius: 20px;
  }

  .hero__logo {
    width: 62px;
    height: 62px;
  }

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

  .match-body {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
  }

  .team {
    flex-direction: column;
    text-align: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .team--away {
    flex-direction: column-reverse;
  }

  .team__logo {
    width: 48px;
    height: 48px;
  }

  .team-name {
    font-size: 0.9rem;
    white-space: normal;
  }

  .team-sub {
    display: none;
  }

  .versus {
    min-width: 80px;
  }

  .score {
    font-size: 1.5rem;
  }

  .scheduled-label {
    font-size: 0.7rem;
    padding: 6px 10px;
  }

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

  .section-heading__note {
    text-align: left;
    max-width: none;
  }

  .marquee::before,
  .marquee::after {
    width: 40px;
  }

  .sponsor-item {
    width: 146px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .page-bg,
  .marquee__track,
  .badge--scheduled::before,
  .sponsor-item--main::before,
  .anniversary-panel::before {
    animation: none !important;
  }
}
