:root {
  --sm-blue1: #da0000;
  --sm-blue2: #700404;
  --header-h: 50px;
  --max-width: 1000px;
  --ball-size: 52px;
  --gap-main: 18px;
  --overlay-bg: rgba(23, 41, 90, 0.10);
}

/* Layout dasar + sticky footer */
html, body {
  height: 100%;
  margin: 0; padding: 0;
  font-family: 'Montserrat', Arial, sans-serif;
  min-height: 100vh;
  color: #fff;
  background: linear-gradient(180deg, rgb(85 0 0 / 52%) 0%, rgb(85 0 0 / 51%) 100%),
    url('https://cdn.qriscloud.asia/files/images/aladin66/roma/bg.webp') center/cover no-repeat fixed;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1 0 auto;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gap-main);
  box-sizing: border-box;
}

.footer {
  flex-shrink: 0;
  margin-top: 36px;
  background: #4a0000;
  padding: 21px 8px 10px 8px;
  color: #fff;
  border-radius: 18px 18px 0 0;
}
.footer-top {display:flex;align-items:center;gap:9px;margin-bottom:9px;}
.footer-top img { height:16px; width:auto;}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 8px;
  margin-top: 10px;
}
.footer-menu {flex: 1; min-width: 110px; font-size: 0.97em; padding-left:10px;}
.footer-menu b {display:block; color:#ffe06a; margin-bottom:6px;}
.footer-menu a {display:block; color:#fff; text-decoration:none; margin-bottom:2px;}
.footer-copyright {flex: 2; text-align: left; font-size: .97em; padding-left:10px; color: #eee; min-width: 150px;}

/* Overlay background */
.overlay-bg {
  position:fixed; z-index:0; top:0;left:0;width:100vw;height:100vh;
  background: var(--overlay-bg); pointer-events:none;
}

/* Header / Navbar */
.header {
  width: 100%;
  background: #e6e6e6;
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  box-shadow: 0 4px 24px 0 #1a267a11;
  padding: 15px 15px;
}
.logo { margin-right:10px;}
.logo img { height: 65px; width:auto; }
.menu-toggle {
  display: none; flex-direction: column; justify-content: center; height: 32px; width: 38px;
  background: none; border: none; margin-left: 10px; cursor: pointer; margin-right: 20px;
}
.menu-toggle span {
  height: 4px; background: var(--sm-blue2); margin: 4px 0; border-radius: 2px;
  display: block; width: 100%; transition: 0.2s;
}
.nav {
  display: flex; align-items: center; gap: 22px; margin-right: 0px;
}
.nav a {
  color: #222; font-weight: 700; text-decoration: none; font-size: 1.11em;
  letter-spacing: .5px; padding: 8px 25px; border-radius: 8px;
  transition: background 0.18s, color 0.18s;
}
.nav a:hover, .nav a.active { color: var(--sm-blue1); background: #eaf6fb; }

/* Draw card */
.draw-section { display:flex; gap: var(--gap-main); justify-content: center; margin: var(--gap-main) 0; flex-wrap:wrap;}
.draw-card {
  flex: 1 1 340px; background:rgb(46 1 1 / 78%); border-radius:18px; padding:24px 18px 24px 18px;
  box-shadow: 0 4px 32px 0 #1a267a33; min-width: 285px; margin-bottom:var(--gap-main);
  max-width: 440px; position:relative; color: #fff;
}
.draw-header { display: flex; justify-content: space-between; align-items: flex-end;}
.draw-title { font-size:1.19em; font-weight: bold; color: #fff;}
.draw-date { font-size:0.98em; color: #c8daf7; margin-bottom:4px;}
.draw-no   { font-size:0.98em; color: var(--sm-blue1); font-weight: bold;}
.countdown-card {
  width: 100%; background:rgb(180 28 28 / 19%); border-radius:13px; margin-bottom:var(--gap-main);
  padding:14px 0 8px 0; text-align:center;
}
.cd-label { font-weight: bold; color: var(--sm-blue1); margin-bottom: 8px; letter-spacing: 1px; font-size:1.8em;}
.cd-timer { font-size: 2.1em; font-weight: bold; color: #fff; margin: 0.11em 0;}
.cd-note  { font-size: 1.01em; color: #ffe06a;}
.prize-row { display: flex; align-items: center; margin: 13px 0 0 0;}
.prize-label { min-width: 86px; font-weight: 700; color: #ffe06a;}
.prize-balls { display: flex; gap: 13px; }
.ball-img { width: var(--ball-size); height: var(--ball-size); display:inline-block;}

/* Past Draws */
.past-draw-row {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 18px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.past-draw-list {
  background: rgb(43 0 0 / 73%);
  border-radius: 13px;
  padding: 18px 14px 18px 14px;
  min-width: 285px;
  max-width: 440px;
  width: 100%;
  color: #fff;
  margin-bottom: 0;
  box-sizing: border-box;
  flex: 1 1 340px;
}
.past-title {color:#ffe06a;font-size:1.3em;margin-bottom:7px;font-weight:bold;letter-spacing:.5px;}
.past-table {width:100%;border-collapse:collapse;}
.past-table td {padding:4px 2px;}
.past-date, .past-no {color:#eaf6fb;font-size:.97em;}
.past-balls {display:flex;gap:7px;}

/* Carousel */
.carousel-section {margin: 32px 0 0 0; display: flex; justify-content: center; width: 100%;}
.carousel {
  width: 100%; max-width: 1000px; overflow: hidden; border-radius: 18px; background: #fff3;
}
.carousel img {width: 100%; height: auto; display: none; border-radius: 18px;}
.carousel img.active {display: block;}

/* ------------- MOBILE RESPONSIVE ------------- */
@media (max-width: 900px) {
  .container { padding: 0 4vw; max-width: 100vw; }
  .draw-section, .past-draw-row { flex-direction: column; gap:0;}
  .draw-card, .past-draw-list {
    margin:0 auto 14px auto;
    max-width: 97vw;
    min-width: 0;
    width: 95%;
    padding-left: 10px;
    padding-right: 10px;
  }
  .prize-balls, .past-balls { gap: 7px; }
  .footer {padding:18px 2px;}
  .carousel { max-width: 97vw; }
  .menu-toggle { display: flex !important; }
  .nav {
    position: fixed; top: var(--header-h); right: 0;
    background: #fff; color:#222;
    width: 210px; height: calc(100vh - var(--header-h));
    box-shadow: -3px 0 16px #1a267a22;
    flex-direction: column; align-items: flex-start; gap: 0; padding: 22px 0;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.2s;
  }
  .nav.show { transform: translateX(0); }
  .nav a {
    color: #222; width: 100%; text-align: left; padding: 10px 22px; border-radius: 0; font-size: 1.12em;
  }
  .header { height: 56px; padding-left: 4vw; padding-right: 4vw;}
  .logo img { height: 50px; }
  .footer-top img { height: 12px; }
}

/* Extra small screen fix */
@media (max-width: 520px) {
  .draw-card { padding-left:7px;padding-right:7px;width:95%;}
  .prize-balls, .past-balls { gap:4px;}
  .footer {padding:14px 2px;}
  .menu-toggle {
  display: none; flex-direction: column; justify-content: center; height: 32px; width: 38px;
  background: none; border: none; margin-left: 10px; cursor: pointer; margin-right: 20px;
}
}

/* Sticky footer fix for all */
body { min-height: 100vh; }
html { min-height: 100vh; }
