:root{
  --red:#c40000;
  --red-dark:#a80000;
  --black:#0c0c0c;
  --panel:#2a2a2a;
  --panel-2:#1a1a1a;
  --text:#ffffff;
  --accent:#ff3b3b;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Arial, Helvetica, sans-serif;
  color:var(--text);
  background:#111 url('images/bg.svg') repeat;
}

#mainwrapper{
  width:1040px;
  margin:0 auto;
  background:#101010;
  box-shadow:0 0 20px rgba(0,0,0,.6);
}

/* Banner */
.banner img{width:100%; display:block}

/* ===== NAVBAR gaya klasik ===== */
.navbar{
  background:#0f0f0f;
  padding:10px;
  border-top:2px solid #2a2a2a;
  border-bottom:2px solid #2a2a2a;
  display:flex; justify-content:center; flex-wrap:wrap; gap:6px;
}
.navbar a{
  position:relative;
  background:linear-gradient(#e52828,#b90f0f);
  border:1px solid #7a0f0f;
  border-radius:6px;
  padding:10px 18px;
  color:#fff; text-decoration:none; font-weight:700;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.25), 0 2px 0 rgba(0,0,0,.35);
  transition:.15s;
}
.navbar a::after{
  content:""; position:absolute; inset:0;
  border-radius:6px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
  pointer-events:none;
}
.navbar a.active,
.navbar a:hover{filter:brightness(1.08); transform:translateY(-1px);}

main#content{
  background:#c81515;
  padding:18px;
  min-height:540px;
  border-top:1px solid #ff5959;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15), inset 0 -1px 0 rgba(0,0,0,.35);
}

.panel{
  background:linear-gradient(#2a2a2a,#232323);
  border-radius:10px;
  border:1px solid #3d3d3d;
  padding:16px;
  margin:14px 0;
  box-shadow:0 1px 0 rgba(255,255,255,.06), 0 6px 14px rgba(0,0,0,.35);
  position:relative;
}
.panel::before{
  content:""; position:absolute; inset:6px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px; pointer-events:none;
}
.panel .title{
  margin:0 0 12px 0;
  font-weight:800;
  text-shadow:0 1px 0 #000;
}

/* ===== Blok info tanggal / draw ===== */
.meta{
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  background:linear-gradient(#2a2a2a,#222);
  border:1px solid #3b3b3b; border-radius:6px;
  padding:10px 12px; margin-bottom:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}

/* ===== Table 1st / 2nd / 3rd ===== */
.result-table{
  width:100%; border-collapse:separate; border-spacing:0;
  margin:10px 0 6px; border-radius:8px; overflow:hidden;
}
.result-table th{
  background:linear-gradient(#e52828,#c21414);
  color:#fff; font-weight:800; letter-spacing:.3px;
  padding:12px 10px; border:1px solid #7a0f0f;
  text-transform:uppercase;
}
.result-table th:first-child{border-top-left-radius:8px;}
.result-table th:last-child{border-top-right-radius:8px;}
.result-table td{
  background:linear-gradient(#1b1b1b,#171717);
  border:1px solid #3b3b3b;
  padding:12px;
}

/* ===== Sub-header (Starter / Consolation) ===== */
.panel h4{
  background:linear-gradient(#e52828,#c21414);
  color:#fff; font-weight:800;
  padding:8px 14px; margin:14px 0 10px;
  border-radius:6px; border:1px solid #7a0f0f;
  display:inline-block;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.25), 0 2px 0 rgba(0,0,0,.3);
}

/* ===== Bola angka ===== */
.balls{display:flex; flex-wrap:wrap; gap:6px; justify-content:center;}
.ball{
  width:32px; height:32px; border-radius:50%;
  display:grid; place-items:center; font-weight:900; color:#fff;
  background:radial-gradient(circle at 35% 30%, #ff6b6b, #b30000 70%);
  border:2px solid #7a0f0f; text-shadow:0 1px 0 #000;
  box-shadow:inset 0 6px 6px rgba(255,255,255,.18),
             0 0 0 1px rgba(0,0,0,.4),
             0 3px 7px rgba(0,0,0,.5);
}

/* ===== Table list (1st / By Day) ===== */
.table-list{width:100%; border-collapse:collapse; margin-top:10px}
.table-list th, .table-list td{
  border:1px solid #4a4a4a; padding:8px;
  background:#1d1d1d;
}
.table-list th{background:#5a0000; color:#fff}
.table-list td:nth-child(1){text-align:center; width:60px}
.btn{
  background:#ff4040; color:#fff; padding:6px 10px;
  text-decoration:none; border-radius:4px; font-weight:700;
}
.btn:hover{filter:brightness(1.1)}

/* Footer */
footer{
  background:#000;
  padding:12px;
  text-align:center;
  font-size:13px;
}

@media (max-width:1080px){
  #mainwrapper{width:1040px;}
}

/* ===== SUB RESULT TABLE (Starter / Consolation) ===== */
.sub-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:14px 0;
  border-radius:8px;
  overflow:hidden;
}

.sub-table th{
  background:linear-gradient(#e52828,#c21414);
  color:#fff; font-weight:800;
  padding:10px;
  text-align:left;
  border:1px solid #7a0f0f;
  text-transform:uppercase;
}

.sub-table td{
  background:linear-gradient(#1b1b1b,#171717);
  border:1px solid #3b3b3b;
  padding:12px;
  text-align:center;
}

/* ===== GRID TABLE 3 KOLOM (Starter/Consolation) ===== */
.grid-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  margin:12px 0;
  border-radius:10px;
  overflow:hidden;
}
.grid-table thead th{
  background:linear-gradient(#e52828,#c21414);
  color:#fff;
  font-weight:800;
  text-transform:none;
  padding:10px 12px;
  text-align:center;
  border:1px solid #7a0f0f;
}
.grid-table thead th:first-child{border-top-left-radius:10px;}
.grid-table thead th:last-child{border-top-right-radius:10px;}

.grid-table tbody tr{
  background:linear-gradient(#1b1b1b,#171717);
}
.grid-table tbody td{
  width:33.333%;
  padding:12px;
  text-align:center;
  border:1px solid #3b3b3b; /* garis antar cell */
}
.grid-table tbody tr:last-child td{
  /* biar bawahnya gak terlalu berat */
  border-bottom:1px solid #3b3b3b;
}


/* === Live Reveal Card Layout === */
.result-outer{
  background:var(--red);
  padding:14px;
  border:1px solid #7a0f0f;
  border-radius:8px;
}
.result-card{
  background:linear-gradient(#2a2a2a,#222);
  border:1px solid #3b3b3b;
  border-radius:8px;
  padding:10px 12px;
  box-shadow:0 1px 0 rgba(255,255,255,.06), 0 6px 14px rgba(0,0,0,.35);
}
.result-card .meta{
  display:flex;justify-content:space-between;align-items:center;gap:12px;
  background:linear-gradient(#2a2a2a,#222);
  border:1px solid #3b3b3b;border-radius:6px;
  padding:8px 10px;margin-bottom:10px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
  color:#ddd;font-size:14px;
}
.band{
  background:linear-gradient(#e52828,#c21414);
  color:#fff;font-weight:800;text-align:center;
  padding:8px 12px;margin:12px 0 8px;border-radius:6px;
  border:1px solid #7a0f0f;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.25),0 2px 0 rgba(0,0,0,.3);
}

/* ——— Baris umum (dipakai home/detail), 3 kolom default ——— */
.rowwrap{display:grid;gap:12px;grid-template-columns:repeat(3,1fr);margin-bottom:6px;}
.prizegrid,.startergrid,.consgrid{width:100%;}
.prizecol{
  background:linear-gradient(#1b1b1b,#171717);
  border:1px solid #3b3b3b;border-radius:8px;
  padding:8px;text-align:center;min-width:0;
}
.prizecol h5{margin:0 0 6px 0;font-weight:800;color:#eee;}

/* ——— Bola angka (global) ——— */
.balls{
  display:flex;justify-content:center;align-items:center;
  gap:8px;flex-wrap:nowrap;white-space:nowrap;
}
.ball{
  width:32px;height:32px;border-radius:50%;
  display:grid;place-items:center;font-weight:900;color:#fff;
  background:radial-gradient(circle at 35% 30%, #ff6b6b, #b30000 70%);
  border:2px solid #7a0f0f;text-shadow:0 1px 0 #000;
  box-shadow:inset 0 6px 6px rgba(255,255,255,.18),0 0 0 1px rgba(0,0,0,.4),0 3px 7px rgba(0,0,0,.5);
}

/* ===== COUNTDOWN pill ===== */
.countdown-wrap{text-align:center;margin:8px 0 12px;}
.countdown-pill{
  display:inline-block;background:#fff;color:#222;font-weight:800;letter-spacing:1px;
  padding:6px 16px;min-width:170px;border-radius:6px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 2px 0 rgba(0,0,0,.25);
}

/* =========================
   SHARED CARDS — HOME & DETAIL (bukan LIVE)
   ========================= */
.result-outer:not(.live-reveal) .rowwrap,
.result-outer:not(.live-reveal) .prizegrid,
.result-outer:not(.live-reveal) .startergrid,
.result-outer:not(.live-reveal) .consgrid,
.panel:not(.live-reveal) .rowwrap,
.panel:not(.live-reveal) .prizegrid,
.panel:not(.live-reveal) .startergrid,
.panel:not(.live-reveal) .consgrid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
}
.result-outer:not(.live-reveal) .prizecol,
.panel:not(.live-reveal) .prizecol{
  background:linear-gradient(#1b1b1b,#171717);
  border:1px solid #3b3b3b;border-radius:8px;padding:8px;text-align:center;min-width:0;
}
.result-outer:not(.live-reveal) .prizecol h5,
.panel:not(.live-reveal) .prizecol h5{margin:0 0 6px 0;font-weight:800;color:#eee;}
.result-outer:not(.live-reveal) .balls,
.panel:not(.live-reveal) .balls{
  display:flex !important;justify-content:center !important;align-items:center !important;
  gap:8px !important;flex-wrap:nowrap !important;white-space:nowrap !important;
}
.result-outer:not(.live-reveal) .ball,
.panel:not(.live-reveal) .ball{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;}

/* =========================
   LIVE DRAW — layout & ukuran
   ========================= */
/* Di live, baris Main Prize berisi satu .prizegrid → jangan jadikan grid 3 kolom di .rowwrap */
.result-card > .rowwrap{display:block !important;}

/* Main Prize: 3 kolom di dalam .prizegrid */
.result-card .prizegrid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
}

/* Starter & Consolation: 3 kolom di rowwrap masing2 */
.result-card .startergrid,
.result-card .consgrid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:14px !important;
}

/* Bola di live (sedikit lebih kecil) */
.result-card .ball{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;}

/* Full width di dalam wrapper: tombol sama lebar, tanpa gap */
.navbar.navbar--full{
  display: grid !important;
  /* sesuaikan jumlah link kalau perlu; auto-fit juga oke */
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 0 !important;
  padding: 0 !important;
  background:#0f0f0f;
  border-top:2px solid #2a2a2a;
  border-bottom:2px solid #2a2a2a;
}

.navbar.navbar--full a{
  display:block;
  text-align:center;
  border-radius:0 !important;
  margin:0 !important;
  padding:12px 14px;                 /* sedikit lebih tinggi biar solid */
  border-left:1px solid #7a0f0f;     /* garis pemisah tipis */
}
.navbar.navbar--full a:first-child{ border-left:none; }

/* efek hover/active tetap jalan */
.navbar.navbar--full a.active,
.navbar.navbar--full a:hover{
  filter:brightness(1.08);
  transform:none;                    /* jangan naik 1px biar rapet */
}

/* ===== Page background: tekstur + vignette ===== */
body{
  background:#0b0b0b;
  background-image:
    radial-gradient(ellipse at center, rgba(255,255,255,.06) 0, rgba(255,255,255,0) 60%),
    repeating-linear-gradient(45deg, #0e0e0e 0 14px, #111 14px 28px);
}

/* ===== Frame utama di luar #mainwrapper ===== */
#mainwrapper{
  position:relative;
  border-radius:14px;
  box-shadow:0 20px 45px rgba(0,0,0,.6);
  z-index:1;
}

/* garis putih tipis + bingkai merah + drop shadow */
#mainwrapper::before{
  content:"";
  position:absolute; inset:-10px;
  border-radius:18px;
  background:linear-gradient(#3a3a3a,#1d1d1d);
  box-shadow:
    0 0 0 2px rgba(255,255,255,.45),   /* outline putih tipis */
    0 0 0 8px #a30000,                 /* bingkai merah */
    0 25px 45px rgba(0,0,0,.65);       /* bayangan jatuh */
  pointer-events:none; z-index:-1;
}

/* outer casing tambahan + kilau sudut */
#mainwrapper::after{
  content:"";
  position:absolute; inset:-18px;
  border-radius:22px;
  background:
    radial-gradient(ellipse at top,    rgba(255,255,255,.06), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(255,255,255,.04), transparent 60%),
    linear-gradient(#1a1a1a,#111);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 0 1px rgba(255,255,255,.08);
  pointer-events:none; z-index:-2;
}

/* ===== Ornamen rel vertikal kiri/kanan (full height) ===== */
.page-rails::before,
.page-rails::after{
  content:"";
  position:fixed; top:0; bottom:0; width:24px;
  background:linear-gradient(#2b2b2b,#141414);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    inset 0 0 12px rgba(0,0,0,.6);
  z-index:0; pointer-events:none;
}
.page-rails::before{ left:12px; }
.page-rails::after { right:12px; }

/* ===== Emboss/vignette halus di area merah ===== */
main#content{
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 30px 50px rgba(0,0,0,.25),
    inset 0 -25px 40px rgba(0,0,0,.28);
  border:1px solid rgba(0,0,0,.4);
  border-radius:0px;
}

/* sudut banner lebih mulus menyatu frame */
.banner img{ border-radius:12px 12px 0 0; display:block; }

/* ——— PATCH: beri ruang agar frame atas terlihat ——— */
#mainwrapper{
  /* sebelumnya sudah ada width/margin, kita tambah top margin saja */
  margin-top: 24px;   /* 24px pas dengan inset -18 + shadow */
  position: relative; /* pastikan z-index berfungsi */
  z-index: 1;
}

/* ——— PATCH: satukan aturan banner, hilangkan duplikasi ——— */
/* HAPUS aturan .banner img yang lama, ganti dengan ini */
.banner img{
  width: 100%;
  display: block;
  border-radius: 12px 12px 0 0; /* sudut atas menyatu ke frame */
}

/* ——— PATCH: pastikan barisan bola selalu horizontal ——— */
.balls{
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}
.balls .ball,
.balls .digit{
  display: grid !important;
  place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
}
/* ukuran live tetap lebih kecil */
.result-card .ball{ width:28px; height:28px; }

.startergrid .prizecol h5,
.consgrid   .prizecol h5 {
  display: none !important;
}


