/* =========================================================
   KENANGAN4D BOLA ADMIN WEBSITE - WHITE GOLD THEME
   PHP + JSON file-based
   ========================================================= */

:root {
  --bg: #fffaf0;
  --bg2: #fff4dc;
  --card: #ffffff;
  --gold: #c58a18;
  --gold2: #ffe7a3;
  --gold3: #8d5c0d;
  --green: #168b55;
  --green2: #d9fff0;
  --red: #d50000;
  --text: #2a1a05;
  --muted: #70551d;
  --border: rgba(197, 138, 24, 0.32);
  --green-border: rgba(22, 139, 85, 0.28);
  --shadow: 0 14px 38px rgba(126, 83, 8, 0.14);
  --radius: 18px;
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(255, 231, 163, 0.75), transparent 34%),
    linear-gradient(180deg, #fffaf0 0%, #fff6e4 45%, #ffffff 100%);
  color: var(--text);
  line-height: 1.7;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(100% - 32px, var(--max)); margin: auto; }

.topbar {
  background: linear-gradient(90deg, #fff5d3, #d69b25, #fff5d3);
  color: #2a1a05;
  text-align: center;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}

header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 250, 240, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(126, 83, 8, 0.08);
}

.navbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo img {
  width: 160px;
  max-height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(197, 138, 24, 0.25));
}

.menu { display: flex; align-items: center; gap: 8px; list-style: none; }

.menu a {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  transition: 0.25s ease;
}

.menu a:hover,
.menu a.active {
  background: linear-gradient(135deg, #d69b25, #fff0b8);
  color: #2a1a05;
  box-shadow: var(--shadow);
}

.nav-btn { display: flex; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, #c58a18, #fff0b8, #a86f12);
  color: #221300;
  box-shadow: 0 10px 26px rgba(197, 138, 24, 0.22);
}

.btn-dark {
  background: #ffffff;
  color: var(--gold);
  border-color: rgba(197, 138, 24, 0.42);
  box-shadow: 0 8px 20px rgba(126, 83, 8, 0.09);
}

.btn-green {
  background: linear-gradient(135deg, #168b55, #d9fff0);
  color: #04170d;
  border-color: var(--green-border);
  box-shadow: 0 10px 26px rgba(22, 139, 85, 0.16);
}

.btn-red {
  background: linear-gradient(135deg, #d50000, #ff8a8a);
  color: #fff;
  border-color: rgba(213,0,0,.35);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(197, 138, 24, 0.26); }

.toggle {
  display: none;
  width: 45px;
  height: 45px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  color: var(--gold);
  font-size: 24px;
  cursor: pointer;
}

section { padding: 76px 0; }

.hero {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,250,240,0.96), rgba(255,250,240,0.78), rgba(255,250,240,0.92)),
    url("../img.banner.jpg") center/cover no-repeat;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 35%, rgba(22,139,85,0.12), transparent 30%),
    radial-gradient(circle at 70% 15%, rgba(197,138,24,0.20), transparent 32%);
}

.hero-content { position: relative; z-index: 2; max-width: 780px; padding: 70px 0; }
.page-hero { min-height: 430px; }

.badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(197,138,24,0.12);
  border: 1px solid var(--border);
  color: #8d5c0d;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: #251700;
  text-shadow: 0 10px 25px rgba(197, 138, 24, 0.10);
}

h1 span, h2 span { color: var(--gold); }

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 680px;
  margin-bottom: 26px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 720px;
}

.stat {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.stat strong { display: block; color: var(--gold); font-size: 22px; line-height: 1.2; }
.stat small { color: var(--muted); }

.running {
  overflow: hidden;
  white-space: nowrap;
  background: linear-gradient(90deg, #fff5d3, #ffffff, #fff5d3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.running div {
  display: inline-block;
  padding: 12px 0;
  color: #8d5c0d;
  font-weight: 900;
  animation: runningText 25s linear infinite;
}

@keyframes runningText { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

.section-head { text-align: center; max-width: 780px; margin: 0 auto 38px; }

.eyebrow {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 13px;
  margin-bottom: 8px;
}

h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; margin-bottom: 14px; color: #2a1a05; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255,231,163,0.32), transparent),
    rgba(255,255,255,0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -65px;
  top: -65px;
  background: radial-gradient(circle, rgba(197,138,24,0.16), transparent 65%);
  pointer-events: none;
}

.card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #d69b25, #fff0b8);
  color: #1a1000;
  font-weight: 1000;
  font-size: 19px;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(197, 138, 24, 0.18);
}

.card h3 { color: #2a1a05; font-size: 21px; margin-bottom: 8px; }
.card p, .card li { color: var(--muted); font-size: 15px; }
.card ul { padding-left: 20px; margin-top: 10px; }

.news-list, .rtp-list, .result-list { display: grid; gap: 14px; }

.news-item, .rtp-item, .result-item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background:
    linear-gradient(90deg, rgba(22,139,85,0.07), transparent),
    rgba(255,255,255,0.94);
  box-shadow: var(--shadow);
}

.news-top, .rtp-top, .result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.news-top strong, .rtp-top strong, .result-top strong { color: #2a1a05; font-size: 18px; }

.tag {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(197,138,24,0.12);
  color: #8d5c0d;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 900;
}

.green-tag { background: rgba(22,139,85,0.10); color: #168b55; border-color: var(--green-border); }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow);
}

table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 15px 16px; border-bottom: 1px solid rgba(197,138,24,0.16); text-align: left; }
th { background: linear-gradient(135deg, #d69b25, #fff0b8); color: #1a1000; font-size: 13px; text-transform: uppercase; }
td { color: var(--muted); }
td strong { color: var(--gold); }

.progress {
  width: 100%;
  height: 12px;
  border-radius: 99px;
  background: rgba(197,138,24,0.10);
  border: 1px solid rgba(197,138,24,0.20);
  overflow: hidden;
  margin: 9px 0;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.cta-box {
  text-align: center;
  padding: 46px 24px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top, rgba(255,231,163,0.52), transparent 42%),
    linear-gradient(180deg, #ffffff, #fff7df);
  box-shadow: var(--shadow);
}

.cta-box p { color: var(--muted); max-width: 720px; margin: 0 auto 22px; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* RTP provider layout */
.rtp-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  align-items: start;
}

.provider-sidebar {
  position: sticky;
  top: 96px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.provider-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(197,138,24,.16);
  color: #2a1a05;
  font-weight: 900;
  transition: .2s ease;
}

.provider-link:hover,
.provider-link.active {
  background: linear-gradient(135deg, #fff3c6, #ffffff);
  color: var(--gold3);
}

.provider-logo {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 1000;
  color: #231400;
  flex: 0 0 auto;
}

.rtp-panel {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #fff7df);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rtp-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #d69b25, #fff0b8);
  color: #221300;
}

.rtp-panel-head h2 { margin: 0; font-size: 24px; }
.search-game {
  width: min(100%, 320px);
  padding: 12px 14px;
  border: 1px solid rgba(42,26,5,.22);
  border-radius: 12px;
  outline: none;
  font-weight: 700;
}

.rtp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 16px;
}

.game-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(197,138,24,.35);
  background: #fff;
  box-shadow: 0 12px 28px rgba(126,83,8,.12);
}

.game-img {
  width: 100%;
  aspect-ratio: 1 / .82;
  object-fit: cover;
  background: linear-gradient(135deg, #fff0b8, #d69b25);
}

.game-body { padding: 10px 12px 14px; text-align: center; }
.game-title { font-size: 13px; line-height: 1.3; color: #2a1a05; min-height: 34px; font-weight: 900; }

.rtp-meter {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(197,138,24,.12);
  border: 1px solid rgba(197,138,24,.18);
  overflow: hidden;
  margin: 8px 0;
}

.rtp-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.rtp-meter b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #1a1000;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);
}

.play-time {
  background: linear-gradient(135deg, #168b55, #d9fff0);
  border-radius: 999px;
  color: #03150c;
  font-size: 12px;
  font-weight: 1000;
  padding: 5px 8px;
  margin: 7px 0;
}

.pattern-title {
  color: #8d5c0d;
  font-size: 12px;
  font-weight: 1000;
  margin-bottom: 5px;
}

.pattern-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}

.ok { color: #168b55; font-weight: 1000; }
.no { color: #d50000; font-weight: 1000; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.result-card h3 {
  color: #2a1a05;
  font-size: 18px;
  margin-bottom: 8px;
}

.result-number {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #d69b25, #fff0b8);
  color: #1a1000;
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: 2px;
  margin: 7px 0;
}

.result-meta {
  color: var(--muted);
  font-size: 13px;
}

footer {
  background: linear-gradient(180deg, #fffaf0, #ffffff);
  border-top: 1px solid var(--border);
  padding: 40px 0 18px;
}

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.footer-logo { width: 155px; margin-bottom: 14px; }
footer p, footer a { color: var(--muted); font-size: 14px; }
footer h3 { color: var(--gold); margin-bottom: 10px; font-size: 17px; }
.footer-links { display: grid; gap: 8px; }
.copyright { text-align: center; border-top: 1px solid rgba(197,138,24,0.18); padding-top: 18px; color: var(--muted); font-size: 13px; }
.mobile-bottom { display: none; }

/* Admin */
.admin-body {
  background: #fffaf0;
}

.admin-wrap {
  width: min(100% - 28px, 1280px);
  margin: 28px auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-header h1 {
  font-size: 28px;
  margin: 0;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.admin-tabs a {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

.admin-tabs a.active {
  background: linear-gradient(135deg, #d69b25, #fff0b8);
  color: #221300;
}

.admin-card {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.admin-card h2 {
  font-size: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-weight: 900;
  color: #2a1a05;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
  background: #fffdf7;
  color: var(--text);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.admin-table th,
.admin-table td {
  vertical-align: top;
}

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(22,139,85,.10);
  border: 1px solid var(--green-border);
  color: #125d3b;
  font-weight: 800;
  margin-bottom: 14px;
}

.error-box {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(213,0,0,.08);
  border: 1px solid rgba(213,0,0,.22);
  color: #a90000;
  font-weight: 800;
  margin-bottom: 14px;
}

.login-panel {
  width: min(100% - 28px, 460px);
  margin: 80px auto;
}

.small {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .rtp-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .toggle { display: grid; place-items: center; }

  .menu, .nav-btn { display: none; }

  .menu.active {
    position: absolute;
    top: 84px;
    left: 16px;
    right: 16px;
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255,250,240,0.98);
    box-shadow: var(--shadow);
  }

  .menu.active a { display: block; padding: 13px; border-radius: 12px; }

  .hero { min-height: auto; }

  .hero-stats, .grid-2, .grid-3, .grid-4, .footer-grid, .form-grid, .result-grid {
    grid-template-columns: 1fr;
  }

  .rtp-layout {
    grid-template-columns: 1fr;
  }

  .provider-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .provider-link {
    min-width: 170px;
    border-right: 1px solid rgba(197,138,24,.16);
  }

  .rtp-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-game {
    width: 100%;
  }

  .rtp-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-bottom {
    position: fixed;
    z-index: 999;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    background: rgba(255,250,240,0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px rgba(126, 83, 8, 0.10);
  }

  body { padding-bottom: 76px; }
}

@media (max-width: 540px) {
  .container { width: min(100% - 24px, var(--max)); }
  .logo img { width: 138px; }
  section { padding: 58px 0; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .news-top, .rtp-top, .result-top { align-items: flex-start; flex-direction: column; }
  .rtp-grid { grid-template-columns: 1fr; }
  .admin-header { align-items: flex-start; flex-direction: column; }
}
