:root {
  --maroon-main:#600202;
  --maroon-dark:#4a0101;
  --maroon-light:#a30808;

  --card-bg:rgba(255,255,255,0.96);
  --text-dark:#1f1f1f;
  --text-gray:#6f6f6f;

  --radius:14px;
  --shadow:0 8px 26px rgba(0,0,0,0.25);
}

*{margin:0;padding:0;box-sizing:border-box;}

body{
  font-family:'Inter','Noto Sans Khmer',system-ui,sans-serif;
  background:
    linear-gradient(180deg,rgba(0,0,0,0.6),rgba(0,0,0,0.88)),
    url('https://cdn.qriscloud.asia/files/images/aladin66/togel/mainbg9.jpg')
    center top / cover fixed no-repeat;
  color:var(--text-dark);
  overflow-x:hidden;
  line-height:1.6;
}

a{text-decoration:none;color:inherit;}

/* HEADER */
.header{
  width:100%;
  background:var(--maroon-main);
  color:#fff;
  padding:12px 0;
  box-shadow:0 4px 12px rgba(0,0,0,0.3);
  position:sticky;
  top:0;
  z-index:100;
}
.header-inner{
  max-width:1180px;
  margin:0 auto;
  padding:0 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.logo-wrap{
  display:flex;
  align-items:center;
  gap:10px;
}
.logo-wrap img{
  height:40px;
}
.logo-tagline{
  font-size:11px;
  opacity:0.9;
}

/* NAV */
.nav{
  display:flex;
  align-items:center;
  gap:26px;
}
.nav a{
  color:#fff;
  font-size:14px;
  font-weight:500;
  position:relative;
}
.nav a::after{
  content:'';
  position:absolute;
  left:0;
  bottom:-3px;
  width:0;
  height:2px;
  background:#ffd68a;
  transition:.2s;
}
.nav a:hover::after{width:100%;}

/* BURGER */
.menu-toggle{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  width:30px;
  height:22px;
  flex-direction:column;
  justify-content:space-between;
}
.menu-toggle span{
  display:block;
  height:3px;
  width:100%;
  border-radius:9px;
  background:#fff;
  transition:.2s;
}
.menu-toggle.active span:nth-child(1){
  transform:translateY(9px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2){
  opacity:0;
}
.menu-toggle.active span:nth-child(3){
  transform:translateY(-9px) rotate(-45deg);
}

/* CENTER CONTAINER */
.center-container{
  max-width:560px;
  margin:40px auto;
  padding:0 16px;
  text-align:center;
}

.card{
  background:var(--card-bg);
  border-radius:var(--radius);
  padding:26px 24px 24px;
  margin-bottom:26px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(4px);
}

.section-title{
  font-size:18px;
  font-weight:700;
  color:var(--maroon-dark);
}
.section-sub{
  font-size:12px;
  color:var(--text-gray);
}

.countdown{
  font-size:48px;
  font-weight:800;
  color:var(--maroon-main);
  margin:10px 0;
}
.countdown-note{
  font-size:13px;
  color:var(--text-gray);
}

/* BALLS TITLE */
.row-title{
  font-size:15px;
  font-weight:700;
  color:var(--maroon-dark);
  margin:14px 0 10px;
}
.balls{
  display:flex;
  justify-content:center;
  gap:14px;
}

/* ============================================================
   GLOSSY BALL SYSTEM — PREMIUM VERSION
   ============================================================ */

/* Base glossy cp-ball */
.cp-ball {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  position: relative;
  overflow: hidden;
  text-shadow: 0 2px 3px rgba(0,0,0,0.35);
  transition: 0.25s;
  border: none;
}

/* Highlight glossy */
.cp-ball::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 6px;
  width: 70%;
  height: 35%;
  background: rgba(255,255,255,0.55);
  border-radius: 50%;
  filter: blur(3px);
  transform: rotate(-20deg);
}

/* Inner shadow for 3D look */
.cp-ball::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 -6px 10px rgba(0,0,0,0.35),
              inset 0  4px 6px rgba(255,255,255,0.3);
  pointer-events: none;
}

/* ----------------------
   EMPTY (not yet input)
------------------------ */
.cp-ball.is-empty {
  background: transparent !important;
  border: 2px dashed #bbb !important;
  color: transparent !important;
}

/* ----------------------
   CROSS (pending draw)
------------------------ */
.cp-ball.is-cross {
  background: #900 !important;
  color: #fff !important;
  border: 2px solid #900 !important;
  font-size: 26px;
}

/* ============================================================
   PRIZE 1 — GLOSSY YELLOW
   ============================================================ */
#prize1-main .cp-ball {
  background: radial-gradient(circle at 30% 30%, #fff8d2, #ffcf3e 40%, #d19800 100%);
  color: #5b0000;
}

#prize1-main .cp-ball.is-number{
  background: radial-gradient(circle at 30% 30%, #fff8d2, #ffcf3e 40%, #d19800 100%) !important;
  color: #5b0000 !important;
}

/* ============================================================
   PRIZE 2 — GLOSSY BLUE
   ============================================================ */
#prize2-main .cp-ball {
  background: radial-gradient(circle at 30% 30%, #e8f4ff, #62b5ff 40%, #1a6fb8 100%);
  color: #003b63;
}

#prize2-main .cp-ball.is-number{
  background: radial-gradient(circle at 30% 30%, #e8f4ff, #62b5ff 40%, #1a6fb8 100%) !important;
  color: #003b63 !important;
}

/* ============================================================
   PRIZE 3 — GLOSSY BROWN
   ============================================================ */
#prize3-main .cp-ball {
  background: radial-gradient(circle at 30% 30%, #f4e7d2, #c7a37e 40%, #744f2f 100%);
  color: #3b1f00;
}

#prize3-main .cp-ball.is-number{
  background: radial-gradient(circle at 30% 30%, #f4e7d2, #c7a37e 40%, #744f2f 100%) !important;
  color: #3b1f00 !important;
}


/* ============================================================
   HISTORY TABLE
============================================================ */
.history-card {
    padding: 26px 22px;
    margin: 20px auto;
    max-width: 680px;
    text-align: center;
    box-shadow: var(--shadow);
}

.history-title{
  font-size:18px;
  font-weight:700;
  color:#fff;
  margin-bottom:18px;
}

.history-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}

.history-table th,
.history-table td{
  padding:8px 6px;
  text-align:center;
  color:#333;
  white-space:nowrap;
}

.history-table th{
  background:var(--maroon-light);
  font-weight:700;
  color:#fff;
}

.history-table tbody tr:nth-child(even){
  background:rgba(255,255,255,0.8);
}

.history-table tbody tr:nth-child(odd){
  background:rgba(255,255,255,0.95);
}

.history-date{
  font-weight:600;
}

/* FOOTER */
footer{
  background:#101010;
  color:#cfcfcf;
  text-align:center;
  padding:24px 0;
  font-size:13px;
}
footer a{color:#e0e0e0;margin:0 6px;}

/* RESPONSIVE */
@media(max-width:768px){
  .menu-toggle{display:flex;}
  .nav{
    position:fixed;
    top:56px;
    left:0;right:0;
    background:var(--maroon-dark);
    flex-direction:column;
    padding:12px 0;
    transform:translateY(-120%);
    opacity:0;
    transition:.2s;
  }
  .nav.active{
    transform:translateY(0);
    opacity:1;
  }
  .nav a{
    padding:10px 0;
    width:100%;
    text-align:center;
    border-bottom:1px solid rgba(255,255,255,0.15);
  }
  .nav a:last-child{border-bottom:none;}
}
