@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:wght@400;600;700;800&display=swap');

:root {
  --bg-color: #070c14;
  --card-bg: #0d1726;
  --border-color: #102138;
  --cyan: #00d2ff;
  --gold: #fbbf24;
  --green: #10b981;
  --red: #ef4444;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Kantumruy Pro', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: #ffffff;
  display: flex;
  justify-content: center;
  padding-bottom: 30px;
}

.app-container {
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-color);
  min-height: 100vh;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* Header Section */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: #09111e;
  border-top: 1px solid rgba(0, 210, 255, 0.2);
  border-bottom: 1px solid rgba(0, 210, 255, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
}

.brand-logo .bolt-icon { 
  color: #ff9800 !important; 
  font-size: 22px !important; 
  display: inline-block !important;
}

.brand-logo .shop-text { 
  color: var(--cyan) !important; 
  display: inline-block !important;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--green);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.green-dot {
  width: 8px;
  height: 8px;
  background-color: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
}

/* Banner Slider Styling */
.banner-slider-container {
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.banner-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  width: 100%;
}

.banner-slide {
  min-width: 100%;
  box-sizing: border-box;
}

.banner-container { padding: 16px; }
.promo-banner {
  width: 100%;
  border-radius: 12px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
  display: block;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  background-color: #1e2f47;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background-color: var(--cyan);
  width: 20px;
  border-radius: 10px;
}

/* Search Area */
.search-section { padding: 0 16px 12px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--card-bg);
  border: 1px solid #1e2f47;
  border-radius: 10px;
  padding: 10px 14px;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13px;
  width: 100%;
}

.category-title {
  padding: 0 16px 12px;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================
   GAME GRID (Soft Glow & Attractive Style)
========================================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 16px 20px;
}

.game-card {
  background: linear-gradient(145deg, #0d1726, #09101d);
  border: 1px solid #1a2c42;
  border-radius: 12px;
  padding: 8px;
  text-decoration: none;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.game-card:hover {
  border-color: rgba(0, 210, 255, 0.6);
  background: linear-gradient(145deg, #112035, #0b1322);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.25);
}

.game-card img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 6px;
  aspect-ratio: 1/1;
}

.game-title {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-topup {
  background-color: var(--cyan);
  color: #000000;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 210, 255, 0.3);
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  color: #ffffff;
  z-index: 2;
}

.card-badge.hot { background-color: var(--red); }
.card-badge.new { background-color: var(--green); }

/* Section Card Layout */
.section-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  margin: 0 16px 16px;
  padding: 16px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

/* Inputs & Form Area */
.id-inputs-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.input-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-box label { font-size: 12px; color: var(--text-muted); }
.input-box input {
  width: 100%;
  height: 46px;
  background-color: var(--bg-color);
  border: 1px solid #1e2f47;
  border-radius: 10px;
  padding: 0 12px;
  color: #ffffff;
  font-size: 15px;
  outline: none;
}

.input-box input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 6px rgba(0, 210, 255, 0.2);
}

.player-name-box {
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--green);
  color: var(--green);
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  display: none;
}

.btn-check-id {
  width: 100%;
  height: 44px;
  background: linear-gradient(90deg, #00b4db, var(--cyan));
  color: #000000;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

/* ==========================================
   DIAMOND PACKAGES (Soft Glow & Active Focus)
========================================== */
.diamond-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.package-card {
  background: linear-gradient(145deg, #0d1726, #09101d);
  border: 1px solid #1a2c42;
  border-radius: 12px;
  padding: 16px 10px 12px 10px;
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease-in-out;
}

.package-card:hover {
  border-color: rgba(0, 210, 255, 0.5);
  background: linear-gradient(145deg, #112035, #0b1322);
}

.package-card.selected {
  border-color: var(--cyan);
  background: linear-gradient(145deg, #132c4d, #0d1d33);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.35);
  transform: translateY(-2px);
}

.package-card.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  color: #000;
  background-color: var(--cyan);
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
}

.package-info-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.package-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.price-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.package-price {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.old-price {
  font-size: 11px;
  color: #64748b;
  text-decoration: line-through;
}

.package-icon-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.diamond-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Badges Styling */
.pkg-badge {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 8px;
  border-bottom-right-radius: 6px;
  color: #ffffff;
  z-index: 2;
}

.pkg-badge.popular, .badge-red { background-color: #e11d48; }
.pkg-badge.promo, .badge-orange { background-color: #f97316; }
.pkg-badge.hot, .badge-gold { background-color: #f59e0b; color: #000; }

/* Payment & Terms */
.payment-badge-box {
  background-color: var(--bg-color);
  border: 1px solid #1e2f47;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.khqr-tag {
  background-color: #e11d48;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
}

.terms-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ⚠️ កែប្រែចំណុចនេះ ដើម្បីដោះស្រាយបញ្ហាប្រអប់ពណ៌លឿងតាន់ធ្លាក់ជួរ */
.warning-box {
  background-color: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--gold);
  margin: 12px 0;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.6;
  word-break: break-word;
}

.order-summary {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  padding: 8px 0;
  border-top: 1px dashed #1e2f47;
}

.summary-price { color: var(--cyan); font-size: 16px; }

.btn-buy-now {
  width: 100%;
  height: 48px;
  background: linear-gradient(90deg, #00b4db, var(--cyan));
  color: #000000;
  font-weight: 800;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

/* Footer Section */
.site-footer {
  padding: 24px 16px 16px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.footer-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.social-btn-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.social-btn {
  flex: 1;
  max-width: 160px;
  background-color: #111b2b;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #1e2d42;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.copyright-text { color: #64748b; font-size: 12px; }

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 16px;
}

.modal-content {
  background-color: var(--card-bg);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  padding: 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.25);
}

.close-modal {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px; color: var(--text-muted);
  cursor: pointer;
}

.modal-header {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 16px;
}

.qr-code-body img {
  width: 180px; height: 180px;
  border-radius: 8px; border: 4px solid #ffffff;
  margin-bottom: 10px;
}

.payment-info {
  background-color: var(--bg-color);
  border: 1px solid #1e2f47;
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  text-align: left;
  margin: 12px 0 16px;
  line-height: 1.6;
}

.btn-done {
  width: 100%;
  height: 42px;
  background: linear-gradient(90deg, #00b4db, var(--cyan));
  color: #000000;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Toast Alert Style */
.toast {
  visibility: hidden;
  min-width: 250px;
  background-color: var(--cyan);
  color: #000;
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  position: fixed;
  z-index: 1001;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
  visibility: visible;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
  from { bottom: 0; opacity: 0; }
  to { bottom: 30px; opacity: 1; }
}

@keyframes fadeout {
  from { bottom: 30px; opacity: 1; }
  to { bottom: 0; opacity: 0; }
}

.btn-check-id, 
.btn-buy-now {
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-check-id:hover, 
.btn-buy-now:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-check-id:active, 
.btn-buy-now:active {
  transform: translateY(2px) scale(0.98);
  filter: brightness(0.9);
}

.package-card {
  cursor: pointer;
  transition: transform 0.12s ease;
}

.package-card:active {
  transform: scale(0.97);
}