* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink-black: #050a14;
  --green-deep: #081426;
  --green-main: #173b68;
  --green-bright: #2f6fb0;
  --green-neon: #e4bd67;
  --lime: #f0d493;
  --yellow: #d4af60;
  --text-main: #ffffff;
  --text-soft: #c2cddd;
  --green-border: rgba(212, 175, 96, 0.62);
  --yellow-border: rgba(212, 175, 96, 0.5);
  --shadow-lite: rgba(0, 0, 0, 0.28);
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #050a14 0%, #0b1b33 55%, #132d50 100%);
  color: var(--text-main);
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 80px auto 0;
  background: linear-gradient(180deg, #112b4b 0%, #070f1e 100%);
  border-radius: 24px;
  border: 1px solid var(--green-border);
  box-shadow: 0 8px 24px var(--shadow-lite);
  overflow: hidden;
  position: relative;
}

.container::before {
  content: none;
}

.header {
  text-align: center;
  padding: 10px 20px;
  background: linear-gradient(180deg, #10233e 0%, #070f1e 100%);
  border-bottom: 1px solid var(--yellow-border);
}

.logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  width: 180px;
  height: auto;
  display: block;
  padding: 5px 12px;
  border-radius: 12px;
  background: #09162a;
  border: 1px solid var(--yellow-border);
}

.subtitle {
  color: var(--lime);
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
}

.title {
  font-size: 28px;
  font-weight: bold;
  margin-top: 10px;
}

.desc {
  margin-top: 12px;
  color: var(--text-soft);
}

/* SEARCH FIXED GLOBAL */
.search-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  padding: 12px 20px 10px;
  background: linear-gradient(180deg, #10233e 0%, #070f1e 100%);
  border-bottom: 1px solid var(--green-border);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.3);
}

.search-box {
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon svg {
  stroke: var(--green-main);
}

#searchInput {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border-radius: 16px;
  background: #e9eef5;
  border: 1px solid var(--green-border);
  color: #10233e;
  font-size: 14px;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

#searchInput:focus {
  background: #ffffff;
  border-color: var(--green-neon);
  box-shadow: 0 0 0 2px rgba(212, 175, 96, 0.2);
}

#searchInput::placeholder {
  color: #777;
}

.banner {
  margin: 18px auto 10px;
  padding: 0 20px;
}

.banner img {
  width: 100%;
  max-width: 900px;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
  background: #070f1c;
  border: 1px solid var(--yellow-border);
  box-shadow: 0 4px 12px var(--shadow-lite);
  transition: transform 0.18s ease;
}

.banner img:hover {
  transform: scale(1.01);
}

/* GRID DESKTOP 4 CARD */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px;
}

.card {
  background: linear-gradient(180deg, #173b68 0%, #081426 100%);
  text-align: center;
  border: 1px solid var(--green-border);
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 3px 8px var(--shadow-lite);
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 260px;
  transition: transform 0.18s ease;
}

.card.hidden {
  display: none;
}

.card img {
  width: 104px;
  height: 70px;
  object-fit: contain;
  padding: 6px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff1cf 0%, #c5a45c 100%);
  border: 1px solid var(--yellow-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease;
}

.resto-name {
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
  color: #fff;
  font-size: 14px;
}

.label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--lime);
  margin-top: 10px;
  text-align: center;
}

.date-text {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 4px;
  text-align: center;
}

.time-text {
  margin-top: 4px;
  text-align: center;
  line-height: 1.15;
  pointer-events: none;
  user-select: none;
}

.result-label {
  display: block;
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.countdown-clock {
  display: block;
  font-size: 20px;
  color: var(--lime);
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.48);
}

.btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 12px;
  font-weight: bold;
  cursor: pointer;
  background: linear-gradient(180deg, #3269a6 0%, #1d497a 55%, #102d50 100%);
  color: #f5dfac;
  border: 1px solid var(--yellow-border);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 5;
  transition: transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.prediction {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #060f1e;
  border: 1px solid rgba(212, 175, 96, 0.3);
  display: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
}

.prediction.show {
  display: block;
}

.numbers {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.number-box {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--yellow-border);
  background: #173452;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lime);
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.24);
}

.section-result {
  margin-top: 10px;
  text-align: center;
}

.section-result h4 {
  font-size: 10px;
  color: var(--lime);
  text-transform: uppercase;
}

.section-result p {
  font-size: 11px;
  color: #fff;
}

/* MINI COMBO */
.mini-combo {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 96, 0.28);
  background: #081426;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mini-col {
  flex: 1;
  text-align: center;
}

.mini-separator {
  width: 1px;
  height: 36px;
  background: rgba(212, 175, 96, 0.3);
}

.mini-title {
  font-size: 10px;
  color: var(--text-soft);
  margin-bottom: 2px;
}

.mini-value-red {
  color: var(--lime);
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.46);
}

.mini-value-white {
  color: #fff;
  font-size: 16px;
  font-weight: bold;
}

/* BUTTON PASANG - RINGAN */
.btn-pasang {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: #2b1a00;
  background: linear-gradient(
    180deg,
    #fae6b6 0%,
    #d4af60 55%,
    #a17b35 100%
  );
  border: 1px solid #edcf8e;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease;
}

.btn-pasang:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.34);
}

.btn-pasang:active {
  transform: scale(0.98);
}

.footer-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px;
}

.footer-box {
  background: linear-gradient(180deg, #143354 0%, #070f1c 100%);
  border: 1px solid var(--green-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 3px 8px var(--shadow-lite);
}

.footer-box h3 {
  color: var(--lime);
  margin-bottom: 10px;
}

.footer-box ul {
  padding-left: 18px;
}

.footer-box li {
  margin-bottom: 6px;
  color: var(--text-soft);
}

/* TOGGLE BUTTON */
.toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  background: linear-gradient(180deg, #3269a6 0%, #1d497a 55%, #102d50 100%);
  border: 1px solid var(--yellow-border);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.18s ease;
}

.toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.34);
}

.toggle-btn.active {
  background: linear-gradient(180deg, #f6e1ac 0%, #d4af60 55%, #a17b35 100%);
  color: #21180b;
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.34);
}

.icon-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.icon-eye svg {
  width: 20px;
  height: 20px;
  display: none;
  stroke: #fff;
  filter: none;
}

.icon-eye .eye-open {
  display: block;
}

.toggle-btn.active .icon-eye .eye-open {
  display: none;
}

.toggle-btn.active .icon-eye .eye-close {
  display: block;
}

/* AUTH BUTTONS */
.auth-buttons {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-login,
.btn-register {
  min-width: 120px;
  padding: 11px 20px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.4px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease;
}

.btn-login {
  color: #fff;
  background: linear-gradient(180deg, #173b68 0%, #10233e 100%);
  border: 1px solid var(--yellow-border);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
}

.btn-login:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.34);
}

.btn-register {
  color: #f5dfac;
  background: linear-gradient(180deg, #3269a6 0%, #1d497a 55%, #102d50 100%);
  border: 1px solid var(--yellow-border);
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
}

.btn-register:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.34);
}

.btn-register:active,
.btn-login:active {
  transform: scale(0.98);
}

/* RUNNING TEXT - RINGAN */
.running-text {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  margin-top: 15px;
  padding: 10px 0;
  background: linear-gradient(180deg, #1b3e67 0%, #0e2441 100%);
  border-top: 1px solid var(--yellow-border);
  border-bottom: 1px solid var(--yellow-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.running-text::before {
  content: none;
}

.running-track {
  display: inline-block;
  padding-left: 100%;
  animation: jalan 15s linear infinite;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #f5dfac;
  text-transform: uppercase;
  text-shadow: none;
  will-change: transform;
}

.disabled-btn {
  background: #29374b;
  color: #c7ced9;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.85;
}

@keyframes jalan {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
  }

  .card:hover img {
    transform: scale(1.03);
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  body {
    padding: 0;
    background: linear-gradient(160deg, #050a14 0%, #0b1b33 60%, #102846 100%);
  }

  .container {
    max-width: 100%;
    margin: 70px 0 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .header {
    padding: 10px 20px 10px;
  }

  .logo {
    margin-bottom: 6px;
  }

  .header::after {
    content: "";
    display: block;
    width: 80px;
    height: 2px;
    margin: 8px auto;
    background: linear-gradient(90deg, transparent, #d4af60, transparent);
    box-shadow: none;
  }

  .title {
    font-size: 22px;
    line-height: 1.35;
    margin-top: 8px;
  }

  .desc {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
  }

  .running-text {
    margin-top: 12px;
    padding: 8px 0;
  }

  .running-track {
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  .search-wrapper {
    padding: 10px;
  }

  .search-box {
    max-width: 100%;
  }

  #searchInput {
    height: 46px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 10px 16px;
  }

  .card {
    padding: 12px;
    border-radius: 18px;
    box-shadow: none;
  }

  .resto-name {
    font-size: 18px;
    margin-top: 12px;
    line-height: 1.3;
  }

  .label {
    margin-top: 12px;
    font-size: 11px;
    letter-spacing: 1px;
  }

  .date-text {
    font-size: 12px;
    margin-top: 6px;
  }

  .result-label {
    font-size: 11px;
  }

  .countdown-clock {
    font-size: 28px;
  }

  .btn {
    margin-top: 12px;
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 15px;
  }

  .prediction {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
  }

  .numbers {
    gap: 8px;
    flex-wrap: wrap;
  }

  .number-box {
    width: 42px;
    height: 42px;
    font-size: 18px;
    border-radius: 12px;
  }

  .section-result h4 {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .section-result p {
    font-size: 12px;
    line-height: 1.7;
  }

  .mini-title {
    font-size: 11px;
  }

  .mini-value-red,
  .mini-value-white {
    font-size: 20px;
    margin-top: 4px;
  }

  .footer-info {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px 10px 18px;
  }

  .footer-box {
    border-radius: 16px;
    padding: 14px;
  }

  .footer-box h3 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .footer-box li {
    font-size: 14px;
    line-height: 1.6;
  }

  .banner img {
    border-radius: 10px;
  }

  .card img,
  .btn,
  .prediction,
  .number-box,
  .mini-combo,
  .btn-pasang,
  .footer-box,
  .toggle-btn,
  .btn-login,
  .btn-register,
  .banner img {
    box-shadow: none;
  }
}

.scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  border: 1px solid var(--yellow-border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #21180b;
  background: linear-gradient(180deg, #f6e1ac 0%, #d4af60 55%, #a17b35 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.32);

  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;

  overflow: hidden;
}

.scroll-top-btn::before {
  content: none;
}

.scroll-top-btn::after {
  content: none;
}

.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-top-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.36);
}

.scroll-top-btn:hover::before {
  content: none;
}

.scroll-top-btn:active {
  transform: scale(0.94);
}

.scroll-top-icon {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  position: relative;
  z-index: 2;
}

@media (max-width: 500px) {
  .scroll-top-btn {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
  }

  .scroll-top-icon {
    font-size: 20px;
  }
}

.prediction {
  display: none !important;
}

.prediction.show {
  display: block !important;
}