@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --bg: #00224d;
  --bg-raise: #002e66;
  --surface: #003a78;
  --surface-2: #004999;
  --border: #0066d9;
  --border-soft: #0050aa;
  --text: #f2eefb;
  --text-muted: #cce0ff;
  --text-faint: #99c2ff;
  --violet: #005ec8;
  --violet-deep: #003a78;
  --pink: #3385ff;
  --green: #34d399;
  --red: #fb7185;
  --gold: #fbbf24;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --grad-brand: linear-gradient(120deg, #005ec8 0%, #3385ff 100%);
  font-size: 16px;
}

*, *::before, *::after{ box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background-color: #001a36;
  background-image: 
    linear-gradient(rgba(0, 34, 77, 0.9), rgba(0, 26, 54, 0.9)), 
    url('https://the.splg.site/images/2026/09/09/bg2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #f2eefb;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4{
  font-family: 'Manrope', 'Inter', sans-serif;
  margin: 0;
}

a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }

/* ---------- Topbar ---------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(0, 34, 77, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar__inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.brand{ display:flex; align-items:center; gap:10px; flex-shrink:0; }

.brand__mark{
  width: auto; 
  height: 48px;
  border-radius: 0;
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: transparent;
  overflow: visible;
  flex-shrink: 0;
}

.brand__mark img{
  height: 70px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: none;
}
.brand__mark img.is-loaded{ display: block; }
.brand__mark img.is-loaded + #logoFallback{ display: none; }
.mainnav{ display:flex; gap: 4px; margin-left: 8px; }
.mainnav__link{
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .15s ease, background .15s ease;
}
.mainnav__link:hover{ color: var(--text); }
.mainnav__link.is-active{
  color: var(--text);
  background: var(--surface-2);
}

.topbar__right{ display:flex; align-items:center; gap:10px; flex-shrink:0; margin-left: auto; }

.authbtn{
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .15s ease, opacity .15s ease, border-color .15s ease;
}
.authbtn--login{
  color: var(--text);
  border: 1px solid var(--border);
  background: transparent;
}
.authbtn--login:hover{ border-color: #3385ff; color: #3385ff; }
.authbtn--register{
  color: #fff;
  background: var(--grad-brand);
  border: 1px solid transparent;
}
.authbtn--register:hover{ opacity: 0.9; transform: translateY(-1px); }
.clock{
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.clock__zone{ color: var(--text-faint); font-size: 0.78rem; }

/* ---------- Hero ---------- */
.hero{
  max-width: 780px;
  margin: 56px auto 0;
  padding: 0 24px;
  text-align: center;
}
.hero__title{
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  min-height: 2.8rem;
}
.typing-cursor{
  color: #3385ff;
  font-weight: 400;
  animation: blink-cursor 0.7s infinite;
  margin-left: 2px;
}
@keyframes blink-cursor{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0; }
}

.hero__rule{
  width: 64px; height: 4px;
  margin: 18px auto;
  border-radius: 4px;
  background: var(--grad-brand);
}
.hero__sub{
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
}

.statrow{
  display:flex;
  justify-content:center;
  gap: 14px;
  margin: 32px auto 0;
  flex-wrap: wrap;
}
.statcard{
  min-width: 108px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.statcard__num{
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 0%, #99c2ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.statcard__label{
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.liveflag{
  margin: 26px auto 6px;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green);
}
.liveflag__dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52,211,153,.6);
  animation: pulse 1.8s infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70%{ box-shadow: 0 0 0 10px rgba(52,211,153,0); }
  100%{ box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}
.hotlabel{
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin: 0;
}

/* ---------- Hot match ticker ---------- */
.hotmatch{
  position: relative;
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 0 24px;
  overflow: hidden;
}

.hotmatch__track{
  display: flex;
  gap: 16px;
  width: max-content;
  animation: tickerScroll 35s linear infinite;
}

.hotmatch:hover .hotmatch__track{
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hotcard{
  flex: 0 0 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display:flex;
  flex-direction:column;
  gap: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.hotcard__meta{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  font-size: 0.72rem;
  color: var(--text-faint);
}
.hotcard__hdp{
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.hotcard__league{
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #99c2ff;
}
.hotcard__teams{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 8px;
}
.hotcard__team{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.hotcard__crest{
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  object-fit: contain;
}
.hotcard__team span{
  font-size: 0.76rem;
  font-weight: 600;
  text-align:center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}
.hotcard__vs{
  font-size: 0.72rem;
  color: var(--text-faint);
  font-weight: 700;
}
.hotcard__score{
  text-align:center;
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.hotcard__score b{ color: var(--green); font-weight:700; display: block; margin-top: 2px;}

/* ---------- Search ---------- */
.searchbar{
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 24px;
}
.searchbar input{
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text);
  font-size: 0.92rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.searchbar input::placeholder{ color: var(--text-faint); }
.searchbar input:focus{
  outline: none;
  border-color: #3385ff;
  box-shadow: 0 0 0 3px rgba(0, 94, 200, 0.3);
}

/* ---------- Boards ---------- */
.boards{
  max-width: 1180px;
  margin: 28px auto 0;
  padding: 0 24px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.board{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.board__eyebrow{
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #99c2ff;
}
.board__title{
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 6px;
}
.board__desc{
  color: var(--text-faint);
  font-size: 0.8rem;
  margin: 6px 0 0;
}

.leaguegroup{ margin-top: 18px; }
.leaguegroup__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 8px;
}
.leaguegroup__name{
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
}
.leaguegroup__count{
  font-size: 0.68rem;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 999px;
}

.matchrow{
  display:grid;
  grid-template-columns: 68px 1fr auto;
  align-items:center;
  gap: 12px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.matchrow:hover{ background: var(--surface-2); }
.matchrow__time{
  display:flex; flex-direction:column;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.matchrow__time b{ color: var(--text); font-size: 0.86rem; }
.matchrow__teams{
  display:flex; flex-direction:column; gap: 3px;
  min-width: 0;
}
.matchrow__team{
  display:flex; align-items:center; gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.matchrow__crest{
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  object-fit: contain;
  flex-shrink:0;
}
.matchrow__value{
  text-align:right;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.matchrow__value.is-score{ color: var(--green); }
.matchrow__value small{
  display:block;
  font-weight:500;
  color: var(--text-faint);
  font-size: 0.62rem;
}

.board__more{
  display:block;
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.board__more:hover{ border-color: #3385ff; background: #005ec8; color: #fff; }

/* ---------- Mini footer ---------- */
.minifoot{
  margin-top: 50px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-raise);
  padding: 22px 24px;
  text-align: center;
}
.minifoot__brand{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.minifoot__icon{
  color: #3385ff;
  font-size: 0.7rem;
}
.minifoot__name{
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.minifoot__copy{
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .boards{ grid-template-columns: 1fr; }
}

@media (max-width: 720px){
  .topbar__inner{ padding: 12px 16px; }
  .clock__zone{ display:none; }
}

@media (max-width: 480px){
  .authbtn{ padding: 7px 11px; font-size: 0.76rem; }
}

@media (max-width: 560px){
  .hotcard{ flex-basis: 220px; }
  .matchrow{ grid-template-columns: 56px 1fr auto; }
}
.text-crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-weight: bold;
  font-size: 11px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  text-align: center;
}
/* Efek Cahaya Kilat Berjalan untuk Baris Pertandingan & Hot Card */
.matchrow, .hotcard, .leaguegroup {
    position: relative;
    overflow: hidden;
}

.matchrow::after, .hotcard::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
    animation: lightSweep 3s ease-in-out infinite;
}

@keyframes lightSweep {
    0% {
        left: -150%;
        top: -150%;
    }
    50% {
        left: 100%;
        top: 100%;
    }
    100% {
        left: 150%;
        top: 150%;
    }
}