/* ============================================================
   YanZz Store — purple & gold store theme (storefront + admin)
   ============================================================ */

:root {
  --purple: #9115DE;
  --purple-dark: #5C1496;
  --purple-deep: #3d0d66;
  --lime: #91D42D;
  --gold: #FACC15;
  --grad: linear-gradient(90deg, #DBB416, #D61529);
  --grad-purple: linear-gradient(135deg, #9115DE, #5C1496);
  --text: #F3F4F6;
  --muted: #CBD5E1;
  --card: rgba(61, 13, 102, 0.5);
  --card-solid: #6717a8;
  --line: rgba(250, 204, 21, 0.18);
  --danger: #f87171;
  --ok: #34d399;
  --radius: 14px;
  --card-elevation: 0 10px 30px -10px rgba(2, 6, 23, 0.45);
  --card-elevation-hover: 0 20px 50px -15px rgba(2, 6, 23, 0.6);
  --font-body: "Space Grotesk", "Noto Sans Khmer", system-ui, sans-serif;
  --font-head: "Sora", "Space Grotesk", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  background: var(--purple);
  background-image:
    radial-gradient(900px 420px at 85% -5%, rgba(250, 204, 21, 0.14), transparent),
    radial-gradient(700px 420px at 0% 30%, rgba(145, 212, 45, 0.08), transparent);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1200px, 94%); margin: 0 auto; }
.main { flex: 1; }

h1, h2, h3 { font-family: var(--font-head); }
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- ticker ---------- */
.ticker-bar {
  background: var(--purple-deep);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.ticker-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  flex-wrap: wrap;
}
.ticker-inner strong { color: var(--gold); }
.ticker-sep { opacity: 0.4; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(92, 20, 150, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(250, 204, 21, 0.22);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--grad);
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(214, 21, 41, 0.4);
  transition: transform 0.2s ease;
}
.brand:hover .brand-logo { transform: scale(1.08) rotate(-6deg); }
.brand-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.2s ease;
}
.nav-link:hover { color: var(--lime); background: rgba(145, 212, 45, 0.08); text-decoration: none; }
.nav-link.active { color: var(--lime); background: rgba(145, 212, 45, 0.12); }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* search pill */
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--purple-deep);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 999px;
  padding: 8px 14px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.header-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.18);
}
.header-search i { color: var(--gold); font-size: 13px; }
.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13.5px;
  width: 140px;
}
.header-search input::placeholder { color: rgba(203, 213, 225, 0.7); }

/* glowing admin/login pill (inspired by krutoch) */
.login-pill {
  position: relative;
  isolation: isolate;
  display: flex;
  height: 2.4rem;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.login-pill::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, #9115DE, #91D42D);
  filter: blur(10px);
  opacity: 0.38;
  animation: pill-glow 2.6s ease-in-out infinite alternate;
}
.login-pill-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(145, 212, 45, 0.6), rgba(145, 21, 222, 0.75));
}
.login-pill-frame::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 12rem; height: 12rem;
  background: conic-gradient(transparent 0 22%, #91D42D 34%, #FACC15 45%, #F3F4F6 50%, transparent 50% 72%, #91D42D 84%, #FACC15 95%, #F3F4F6 100%);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: pill-orbit 3.2s linear infinite;
}
.login-pill-core {
  position: relative;
  display: inline-flex;
  align-self: stretch;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.8rem 0 0.28rem;
  overflow: hidden;
  border-radius: inherit;
  background: var(--grad-purple);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -2px 6px rgba(0, 0, 0, 0.25);
  font-weight: 700;
  font-size: 13.5px;
}
.login-pill-core::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-160%) skewX(-18deg);
  animation: pill-shine 4.2s ease-in-out 1.2s infinite;
  pointer-events: none;
}
.login-pill-icon {
  position: relative;
  display: inline-flex;
  width: 1.8rem; height: 1.8rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #FACC15, #91D42D);
  color: #5C1496;
  font-size: 0.78rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.login-pill-chevron { color: var(--gold); font-size: 0.62rem; }
.login-pill:hover { transform: translateY(-2px) scale(1.03); text-decoration: none; }
.login-pill:hover .login-pill-core::after { animation: pill-shine-now 900ms ease-out; }
.login-pill-label { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }

@keyframes pill-glow { from { opacity: 0.28; } to { opacity: 0.6; } }
@keyframes pill-orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes pill-shine { 0%, 62% { transform: translateX(-160%) skewX(-18deg); } 100% { transform: translateX(330%) skewX(-18deg); } }
@keyframes pill-shine-now { from { transform: translateX(-160%) skewX(-18deg); } to { transform: translateX(330%) skewX(-18deg); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-head);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 22px -6px rgba(214, 21, 41, 0.55);
}
.btn-primary:hover { box-shadow: 0 12px 28px -6px rgba(219, 180, 22, 0.55); }
.btn-ghost {
  background: var(--purple-deep);
  color: var(--text);
  border: 1px solid rgba(250, 204, 21, 0.25);
}
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------- hero slider ---------- */
.slider {
  position: relative;
  margin-top: 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 25px 60px -20px rgba(0, 0, 0, 0.65);
  background: var(--purple-deep);
}
.slider-viewport { overflow: hidden; }
.slider-track { position: relative; }
.slide {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 280px;
  padding: 40px 6%;
  animation: slide-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.slide.active { display: flex; }
.slide-1 { background: linear-gradient(120deg, #5C1496 0%, #9115DE 55%, #7b11c9 100%); }
.slide-2 { background: linear-gradient(120deg, #3d0d66 0%, #5C1496 60%, #9115DE 100%); }
.slide-3 { background: linear-gradient(120deg, #9115DE 0%, #DBB416 140%); }
@keyframes slide-in { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }

.slide-content { position: relative; z-index: 2; max-width: 560px; }
.slide-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(250, 204, 21, 0.35);
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}
.slide h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.01em;
}
.slide-accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(250, 204, 21, 0.35));
}
.slide p { color: rgba(243, 244, 246, 0.85); margin: 12px 0 20px; font-size: 15.5px; }
.slide-art {
  font-size: clamp(80px, 14vw, 150px);
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
  animation: art-float 3.4s ease-in-out infinite;
  user-select: none;
}
@keyframes art-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }

.slider-pagination {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.pg-bar {
  width: 34px;
  height: 6px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}
.pg-fill { display: block; height: 100%; width: 0%; border-radius: inherit; background: var(--grad); }
.pg-bar.active .pg-fill { animation: pg-fill 5s linear forwards; }
@keyframes pg-fill { from { width: 0%; } to { width: 100%; } }

/* ---------- sections ---------- */
.section { padding: 44px 0 10px; }
.section-alt {
  margin-top: 34px;
  padding: 44px 5% 34px;
  background: rgba(61, 13, 102, 0.35);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.section-alt > .section-head, .section-alt > .package-grid, .section-alt > .steps { width: min(1200px, 100%); margin-left: auto; margin-right: auto; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-title { display: flex; align-items: center; gap: 12px; font-size: clamp(18px, 3vw, 24px); font-weight: 800; }
.title-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--purple-deep);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: 15px;
  flex: 0 0 38px;
}
.title-orbit {
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  background: conic-gradient(transparent 60%, var(--lime) 75%, var(--gold) 85%, transparent 95%);
  animation: pill-orbit 4s linear infinite;
  opacity: 0.6;
  z-index: -1;
}
.count-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(61, 13, 102, 0.6);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
  color: var(--lime);
}
.count-pill i { color: var(--gold); }

/* ---------- game catalog grid ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.game-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-body);
  box-shadow: var(--card-elevation);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.2s ease;
  text-align: center;
}
.game-tile:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--card-elevation-hover), 0 0 34px -6px rgba(250, 204, 21, 0.35);
  border-color: rgba(250, 204, 21, 0.5);
}
.game-tile.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.45), var(--card-elevation); }
.game-tile-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
}
.game-tile-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), transparent 45%);
}
.game-tile-emoji {
  font-size: clamp(38px, 6vw, 58px);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.game-tile:hover .game-tile-emoji { transform: scale(1.14) rotate(-6deg); }
.game-tile-check { position: absolute; top: 8px; right: 8px; color: var(--gold); font-size: 18px; text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.game-tile-name { font-weight: 700; font-size: 14.5px; }
.game-tile-cta { font-size: 12px; color: var(--lime); font-weight: 700; }
.game-tile-cta i { font-size: 10px; transition: transform 0.2s ease; }
.game-tile:hover .game-tile-cta i { transform: translateX(3px); }

.empty-note, .pick-game-note {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  padding: 26px 0;
  font-size: 15px;
}
.pick-game-note { display: block; }

/* ---------- package cards ---------- */
.package-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-body);
  box-shadow: var(--card-elevation);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.2s ease;
  animation: pkg-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--card-delay, 0s);
}
@keyframes pkg-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.pkg-card:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--card-elevation-hover), 0 0 34px -6px rgba(250, 204, 21, 0.35);
  border-color: rgba(250, 204, 21, 0.5);
}
.pkg-card.selected { border-color: var(--gold); background: rgba(250, 204, 21, 0.08); box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.45), var(--card-elevation); }
.pkg-tag {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 10px;
  box-shadow: 0 4px 12px rgba(214, 21, 41, 0.45);
}
.pkg-icon { font-size: 26px; margin-bottom: 4px; }
.pkg-name { font-family: var(--font-head); font-weight: 700; font-size: 15.5px; }
.pkg-price {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-head);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pkg-khr { color: var(--muted); font-size: 12.5px; }
.pkg-cta {
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--lime);
  border-top: 1px dashed var(--line);
  padding-top: 8px;
  width: 100%;
  text-align: center;
}
.pkg-card.selected .pkg-cta { color: var(--gold); }

/* ---------- order ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--card-elevation);
}
.order-layout { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
.order-left { display: flex; flex-direction: column; gap: 18px; }

.summary-card h3, .pay-card h3, .order-form h3 { margin-bottom: 14px; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.summary-card h3 i, .pay-card h3 i, .order-form h3 i { color: var(--gold); }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed rgba(250, 204, 21, 0.16); font-size: 14.5px; }
.summary-row span { color: var(--muted); }
.summary-row.total { font-size: 17px; border-bottom: none; padding-top: 12px; }
.summary-row.total strong {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 21px;
}
.sum-khr { color: var(--muted); font-size: 13px; text-align: right; }
.hint { color: var(--gold); font-size: 13px; margin-top: 8px; }

.aba-box {
  background: rgba(61, 13, 102, 0.65);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  display: grid;
  gap: 8px;
}
.aba-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.aba-line span { color: var(--muted); }
.aba-line strong { font-family: var(--font-head); color: var(--gold); user-select: all; }
.aba-box .btn { justify-self: start; }
.pay-steps { margin-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
.warn-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--gold);
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
}

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field > span { font-size: 13px; font-weight: 700; color: var(--muted); }
.field small { color: rgba(203, 213, 225, 0.8); font-size: 12px; }
.field input, .field textarea {
  width: 100%;
  background: rgba(61, 13, 102, 0.8);
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font-size: 14.5px;
  font-family: var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(145, 212, 45, 0.18);
}
.field input:disabled { color: var(--muted); opacity: 0.85; }
.field textarea { resize: vertical; }

.form-error {
  color: #fecaca;
  font-size: 13.5px;
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 14px 0 0;
}
#orderForm .btn-block, .login-card .btn-block { margin-top: 16px; }
.fine-print { color: rgba(203, 213, 225, 0.75); font-size: 12px; margin-top: 10px; text-align: center; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 6px 16px -4px rgba(214, 21, 41, 0.5);
}
.step h3 { font-size: 15.5px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13.5px; }

/* ---------- FAQ ---------- */
.faq-list { width: min(760px, 100%); margin: 0 auto; display: grid; gap: 12px; }
.faq-item { padding: 0; }
.faq-item summary {
  cursor: pointer;
  padding: 17px 20px;
  font-family: var(--font-head);
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold); font-size: 22px; font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 20px 18px; color: var(--muted); font-size: 14px; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 50px;
  background: rgba(61, 13, 102, 0.85);
  border-top: 1px solid var(--line);
  padding: 26px 0 18px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { font-family: var(--font-head); letter-spacing: 0.02em; }
.footer-brand p { color: var(--muted); font-size: 13px; }
.payment-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(145, 21, 222, 0.35);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.pay-aba { border-color: rgba(145, 212, 45, 0.45); }
.pay-aba i { color: var(--lime); }
.pay-badge i { color: var(--gold); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 14px; font-weight: 600; }
.footer-links a:hover { color: var(--lime); }
.footer-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(250, 204, 21, 0.12);
  color: rgba(203, 213, 225, 0.7);
  font-size: 12.5px;
  text-align: center;
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 4, 36, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
/* IMPORTANT: the hidden attribute must actually hide the popup,
   otherwise display:flex above would keep it (and its click-blocking
   backdrop) on screen all the time. */
.modal-backdrop[hidden] { display: none !important; }
.modal { width: min(420px, 100%); text-align: center; background: var(--card-solid); }
.modal-icon { font-size: 44px; margin-bottom: 10px; }
.modal h3 { font-size: 22px; margin-bottom: 8px; }
.modal p { color: var(--muted); font-size: 14.5px; }
.order-id-box {
  background: rgba(61, 13, 102, 0.8);
  border: 1px dashed var(--gold);
  border-radius: 12px;
  padding: 14px;
  margin: 16px 0;
}
.order-id-box code { font-size: 14px; color: var(--gold); user-select: all; word-break: break-all; }
.modal-summary { font-size: 13.5px; margin-bottom: 16px; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-login { display: flex; justify-content: center; padding: 90px 20px; }
.login-card { width: min(400px, 100%); }
.login-card h2 { margin-bottom: 6px; }

.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.stats-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { padding: 12px 18px; text-align: center; min-width: 90px; background: var(--card); }
.stat strong { display: block; font-family: var(--font-head); font-size: 22px; }
.stat span { color: var(--muted); font-size: 12px; }
.stat:nth-child(1) strong { color: var(--gold); }
.stat:nth-child(2) strong { color: var(--brand-2, #22d3ee); }
.stat:nth-child(3) strong { color: var(--ok); }
.stat:nth-child(4) strong { color: var(--lime); }

.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-actions input, .admin-actions select {
  background: rgba(61, 13, 102, 0.8);
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 10px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: var(--font-body);
}
.admin-actions input { min-width: 210px; }

.table-wrap { overflow-x: auto; padding: 0; }
.orders-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.orders-table th, .orders-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.orders-table th {
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(61, 13, 102, 0.9);
  position: sticky;
  top: 0;
}
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: rgba(250, 204, 21, 0.05); }
.td-small { color: var(--muted); font-size: 12.5px; }
.orders-table code { color: var(--gold); font-size: 12px; }

.status-select {
  background: rgba(61, 13, 102, 0.8);
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 8px;
  font-size: 12.5px;
  margin-bottom: 6px;
  display: block;
}
.pill { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 10px; text-transform: capitalize; }
.pill-pending { background: rgba(250, 204, 21, 0.18); color: var(--gold); }
.pill-processing { background: rgba(34, 211, 238, 0.16); color: #67e8f9; }
.pill-completed { background: rgba(145, 212, 45, 0.18); color: var(--lime); }
.pill-refunded { background: rgba(248, 113, 113, 0.16); color: var(--danger); }

.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* ============================================================
   KHQR PAYMENT + RECEIPTS + BANNERS
   ============================================================ */
.khqr-box { display: grid; gap: 12px; }
.khqr-frame {
  justify-self: center;
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  border: 2px solid var(--gold);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.55);
}
.khqr-frame img { display: block; width: 200px; height: 200px; object-fit: contain; }
.khqr-frame.big img { width: 230px; height: 230px; }
.khqr-pending {
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  background: rgba(61, 13, 102, 0.5);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 14px;
}
.khqr-pending i { color: var(--gold); margin-right: 6px; }

.slide-banner { padding: 0; min-height: 300px; }
.slide-banner.active { display: block; }
.slide-banner img { width: 100%; height: 100%; min-height: 300px; max-height: 420px; object-fit: cover; display: block; }

.pay-amount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 10px;
  padding: 9px 13px;
  margin-bottom: 14px;
  font-size: 14px;
}
.pay-amount-row span { color: var(--muted); }
.pay-amount-row strong { color: var(--gold); font-family: var(--font-head); font-size: 16px; }

.receipt-upload {
  display: block;
  margin-top: 14px;
  border: 2px dashed rgba(250, 204, 21, 0.4);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.receipt-upload:hover { border-color: var(--gold); background: rgba(250, 204, 21, 0.06); color: var(--text); }
.receipt-upload i { color: var(--gold); margin-right: 6px; }
.receipt-preview {
  display: block;
  max-width: 220px;
  max-height: 220px;
  margin: 12px auto 0;
  border-radius: 10px;
  border: 2px solid var(--lime);
}
.receipt-preview[hidden] { display: none !important; }

.modal-actions { display: grid; gap: 8px; margin-top: 14px; }
.pay-modal { width: min(420px, 100%); }
.modal-hint { color: var(--gold); font-size: 13px; margin-top: 8px; }
#payStep2 { text-align: center; }

/* ---------- admin tabs & uploads ---------- */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { background: var(--grad); color: #fff; border-color: transparent; }

.upload-panel { display: grid; gap: 14px; }
.upload-drop {
  border: 2px dashed rgba(250, 204, 21, 0.4);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.upload-drop:hover { border-color: var(--gold); background: rgba(250, 204, 21, 0.05); }
.upload-drop i { color: var(--gold); font-size: 22px; display: block; margin-bottom: 8px; }
.upload-preview {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  justify-self: start;
}
.upload-preview[hidden] { display: none !important; }

.banner-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.banner-admin-item { display: grid; gap: 8px; }
.banner-admin-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; }
.banner-admin-item .row { display: flex; gap: 8px; align-items: center; }
.banner-admin-item input[type="text"], .banner-admin-item input[type="number"] {
  background: rgba(61, 13, 102, 0.8);
  border: 1px solid rgba(250, 204, 21, 0.22);
  border-radius: 8px;
  color: var(--text);
  padding: 7px 9px;
  font-size: 12.5px;
  font-family: var(--font-body);
  width: 100%;
}
.banner-admin-item input[type="number"] { width: 64px; }
.banner-admin-item label.inline { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }

.receipt-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  display: block;
}
.receipt-thumb:hover { border-color: var(--gold); }
.no-receipt { color: var(--muted); font-size: 12px; }

.settings-note {
  color: var(--muted);
  font-size: 13px;
  background: rgba(61, 13, 102, 0.5);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .order-layout { grid-template-columns: 1fr; }
  .package-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nav-link span { display: none; }
  .nav-link i { font-size: 16px; }
}
@media (max-width: 720px) {
  .header-search input { width: 90px; }
  .slide { min-height: 240px; padding: 30px 6%; }
  .slide-art { display: none; }
  .package-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 520px) {
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .package-grid, .form-grid, .steps { grid-template-columns: 1fr; }
  .brand-title { font-size: 15px; }
  .header-search { display: none; }
  .ticker-sep, .ticker-inner span:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
