/* ==================== MLBB THEME (scoped, mobile-first) ==================== */
.mlbb-main {
  --mlbb-bg: #0b1220;
  --mlbb-surface: #111827;
  --mlbb-border: rgba(255, 255, 255, 0.08);
  --mlbb-text: #eaf2ff;
  --mlbb-text-dim: #9fb3d1;
  --mlbb-primary: #2563eb;
  --mlbb-primary-dark: #1d4ed8;

  font-family: 'Poppins','Segoe UI',sans-serif;
  background: var(--mlbb-bg);
  color: var(--mlbb-text);
  padding-bottom: 40px;
  max-width: 480px;  /* mobile-first width */
  margin: 0 auto;    /* center the page */
  padding: 0 12px;
}

/* ==================== Hero Banner ==================== */
.mlbb-hero-banner {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
}

.mlbb-hero-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mlbb-hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
}

.mlbb-hero-content {
  position: absolute;
  bottom: 12px;
  left: 16px;
  z-index: 2;
}

.mlbb-hero-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.mlbb-hero-subtitle {
  font-size: 0.9rem;
  color: var(--mlbb-text-dim);
}

/* ==================== Sticky Tabs ==================== */
/* Sticky Tabs — with background blur */
#mlbb-sticky-tabs {
  position: sticky;
  top: 0; /* adjust if your header height differs */
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;

  /* Frosted glass effect */
  background: rgba(11, 18, 32, 0.6); /* semi-transparent version of --mlbb-bg */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari support */

  border-bottom: 1px solid rgba(255,255,255,0.08);
}

#mlbb-sticky-tabs::-webkit-scrollbar { display: none; }

.game-tab-btn {
  flex: 1 1 calc(50% - 8px);  /* each takes ~half width */
  text-align: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  transition: background .2s ease, transform .2s ease;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.game-tab-btn:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.game-tab-btn.active {
  background: linear-gradient(90deg, var(--mlbb-primary), var(--mlbb-primary-dark));
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* ==================== Section Titles ==================== */
.mlbb-product-section > h3,
.mlbb-step-title,
.mlbb-step1-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 16px 0 10px;
 
}
.mlbb-step-title {
  padding-left: 36px; /* space for circle */
}

/* ==================== Step Cards ==================== */
.mlbb-step1-card,
.mlbb-step2-card,
.mlbb-step3-card {
  background: var(--mlbb-surface);
  border: 1px solid var(--mlbb-border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  position: relative;  /* required so ::before sticks to card */
}
.mlbb-step1-card {
  padding: 12px 14px;
  background: rgba(37,99,235,0.08); /* light blue tint */
}
.mlbb-step2-card {
  background: rgba(16,185,129,0.08); /* teal/green tint */
}
.mlbb-step3-card {
  background: rgba(245,158,11,0.08); /* amber tint */
}
/* Ensure all step headers align circle + title properly */
.mlbb-step1-header,
.mlbb-step2-header,
.mlbb-step3-header {
  display: flex;
  align-items: center;
  gap: 8px; /* spacing between circle and title */
}

/* Tighten up the circle so it's consistent */
.mlbb-step1-circle,
.mlbb-step2-circle,
.mlbb-step3-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}


/* Step-specific colors */
.mlbb-step1-circle { background: #2563eb; }  /* blue */
.mlbb-step2-circle { background: #10b981; }  /* green */
.mlbb-step3-circle { background: #f59e0b; }  /* amber */

/* Inputs */
.mlbb-step1-inputrow {
  display: flex;
  gap: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 6px 8px;
  width: 100%;
}
.mlbb-step1-inputrow .mlbb-floating-group {
  flex: 1;
}

.mlbb-step1-inputrow .mlbb-floating-group:first-child {
  flex: 2;  /* User ID wider */
}

.mlbb-floating-group input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: #0f172a;
  color: #eaf2ff;
}

.mlbb-floating-group label {
  display: block;
  font-size: 0.8rem;
  margin-top: 4px;
  color: #9ca3af;
}


.mlbb-step1-userid,
.mlbb-step1-zoneid {
  flex: 1;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  outline: none;
  color: var(--mlbb-text);
  font-size: 0.95rem;
  padding: 8px 10px;
  height: 36px;
}
.mlbb-step1-userid::placeholder,
.mlbb-step1-zoneid::placeholder {
  color: var(--mlbb-text-dim);
  font-size: 0.85rem;
}

/* ==================== Product Grid ==================== */
.game-product-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.game-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  border-radius: 14px;
  background: var(--mlbb-surface);
  border: 1px solid var(--mlbb-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: transform .2s ease, box-shadow .2s ease;
}

.game-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.game-product-card.selected {
  border-color: transparent;
  background: linear-gradient(180deg, rgba(37,99,235,.18), rgba(23,70,162,.18)) , var(--mlbb-surface);
  outline: 2px solid rgba(37,99,235,.35);
}

/* Disabled product styling */
.game-product-card[data-status="disabled"] {
  opacity: 0.45;
  filter: grayscale(100%);
  cursor: not-allowed;
  pointer-events: none;
}

.game-product-card[data-status="disabled"]:hover {
  transform: none;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.game-product-card img {
  width: 92px;
  height: 92px;
  object-fit: contain;
  margin-bottom: 8px;
}

.game-product-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
  text-align: center;
}
.game-product-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 4px;
}
.game-product-offer {
  font-size: 0.85rem;
  color: var(--mlbb-text-dim);
}

.game-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f59e0b;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
}

.game-product-buy-btn {
  margin-top: 8px;
  padding: 6px 12px;
  background: linear-gradient(90deg, var(--mlbb-primary), var(--mlbb-primary-dark));
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform .2s ease, filter .2s ease;
}

.game-product-buy-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ==================== Buttons ==================== */
.mlbb-step2-next-btn,
.mlbb-paynow-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, var(--mlbb-primary), var(--mlbb-primary-dark));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(30,64,175,.35);
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}
.mlbb-step2-next-btn:hover,
.mlbb-paynow-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* ==================== Payment Section ==================== */
.mlbb-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.mlbb-payment-option {
  background: var(--mlbb-surface);
  border: 1px solid var(--mlbb-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 90px;
  transition: border .2s ease, transform .2s ease;
}
.mlbb-payment-option img {
  max-width: 70%;
  max-height: 36px;
  object-fit: contain;
  margin-bottom: 6px;
}
.mlbb-payment-option span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mlbb-text);
}
.mlbb-payment-option:hover {
  border-color: var(--mlbb-primary);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.mlbb-payment-option input[type="radio"] {
  display: none;
}
.mlbb-payment-option.selected {
  border-color: var(--mlbb-primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,.4);
}

/* ==================== Responsive ==================== */
@media (min-width: 700px) {
  .mlbb-hero-banner { height: 280px; }
  .mlbb-hero-title { font-size: 1.5rem; }
  .game-product-list { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .mlbb-payment-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1025px) {
  .mlbb-hero-banner { height: 450px; }
  .mlbb-hero-title { font-size: 2rem; }
  .game-product-list { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .mlbb-payment-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 700px) {
  .mlbb-main { max-width: 720px; }
}
@media (min-width: 1025px) {
  .mlbb-main {max-width: 1200px;}
}

@media (min-width: 700px) {
  .game-tab-btn {
    flex: unset;  /* natural sizing */
  }
  #mlbb-sticky-tabs {
    flex-wrap: nowrap; /* single row on tablets/desktops */
    overflow-x: auto;
  }
}

/* testing further improvements on mlbbphp from chatgpt */
/* Hero Banner improvement */
.mlbb-hero-banner img {
  transition: transform 6s ease;
}
.mlbb-hero-banner:hover img {
  transform: scale(1.08);
}
.mlbb-hero-title {
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}



/* Inputs improvement */
.mlbb-floating-group input:focus {
  border-color: var(--mlbb-primary);
  box-shadow: 0 0 6px rgba(37,99,235,0.5);
  background: #111c35;
}

/* Product badges */
.game-product-badge.hot { background: #ef4444; }
.game-product-badge.popular { background: #f59e0b; }
.game-product-badge.best { background: #10b981; }

/* Payment option selected state */
.mlbb-payment-option.selected {
  border: 2px solid var(--mlbb-primary);
  box-shadow: 0 0 10px rgba(37,99,235,0.6);
  position: relative;
}
.mlbb-payment-option.selected::after {
  content: "✔";
  position: absolute;
  top: 6px; right: 8px;
  font-size: 0.9rem;
  color: #4ade80;
}

/* Pay now button pulse */
.mlbb-paynow-btn {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(37,99,235,0); }
}

/* Inputs improvement */
.mlbb-floating-group input:focus {
  border-color: var(--mlbb-primary);
  box-shadow: 0 0 6px rgba(37,99,235,0.5);
  background: #111c35;
}

/* Product badges */
.game-product-badge.hot { background: #ef4444; }
.game-product-badge.popular { background: #f59e0b; }
.game-product-badge.best { background: #10b981; }

/* Payment option selected state */
.mlbb-payment-option.selected {
  border: 2px solid var(--mlbb-primary);
  box-shadow: 0 0 10px rgba(37,99,235,0.6);
  position: relative;
}
.mlbb-payment-option.selected::after {
  content: "✔";
  position: absolute;
  top: 6px; right: 8px;
  font-size: 0.9rem;
  color: #4ade80;
}

/* Pay now button pulse */
.mlbb-paynow-btn {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(37,99,235,0); }
}

/* Info Cards Section */
.mlbb-info-cards {
  display: flex;
  flex-direction: column;   /* stack on mobile */
  gap: 16px;
  margin: 20px 0;
}

.mlbb-info-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mlbb-info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.mlbb-info-card h3 {
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: #4dabf7; /* light blue accent */
}

.mlbb-info-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mlbb-info-card ul li {
  margin: 6px 0;
  padding-left: 16px;
  position: relative;
}

.mlbb-info-card ul li::before {
  content: "✔";
  color: #22c55e; /* green check */
  position: absolute;
  left: 0;
  font-size: 0.9rem;
}

.mlbb-info-card .note {
  font-size: 0.85rem;
  color: #facc15; /* amber note */
  margin-top: 6px;
}

/* --- Desktop layout --- */
@media (min-width: 900px) {
  .mlbb-info-cards {
    flex-direction: row;       /* row layout */
    flex-wrap: wrap;           /* allow multiple rows */
    gap: 20px;
  }
  .mlbb-info-card {
    flex: 1 1 calc(50% - 20px); /* 2 cards per row */
    max-width: 48%;
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  z-index: 9999;
}
.spinner {
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid #2563eb;
  border-radius: 50%;
  width: 40px; height: 40px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg);} }
.hidden { display: none; }

.error-box {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
  font-weight: 600;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #9ca3af;
  margin: 12px 0;
}

.mlbb-step1-idinfo {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.02)
  );

  font-size: 0.92rem;
  line-height: 1.55;
  color: #cbd5e1; /* soft slate */

  letter-spacing: 0.2px;

  border: 1px solid rgba(255,255,255,0.06);
}

/* Highlight important parts */
.mlbb-step1-idinfo strong {
  color: #e5e7eb;
  font-weight: 600;
}

/* ===========================
   HELP ICON
=========================== */
.step-help-btn {
  margin-left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* ===========================
   OVERLAY
=========================== */
.id-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 999;
}

/* ===========================
   BOTTOM SHEET (MOBILE FIRST)
=========================== */
.id-help-sheet {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #0b1220;
  border-radius: 20px 20px 0 0;
  padding: 20px;
  color: #e5e7eb;
  animation: slideUp 0.25s ease;
}

/* Header */
.id-help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.id-help-header button {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  cursor: pointer;
}

/* Content */
.id-help-content {
  margin-top: 14px;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.id-help-content ol {
  margin: 10px 0 14px 18px;
}

.id-example {
  background: rgba(255,255,255,0.08);
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  color: #60a5fa;
}

/* Desktop tweak */
@media (min-width: 768px) {
  .id-help-sheet {
    left: 50%;
    transform: translateX(-50%);
    max-width: 420px;
    border-radius: 20px;
    bottom: 20%;
  }
}

/* Animation */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===========================
   ID HELP OVERLAY
=========================== */
.id-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  display: none;
  z-index: 9999;
}

/* Bottom Sheet */
.id-help-sheet {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: #0b1220;
  border-radius: 22px 22px 0 0;
  padding: 18px;
  color: #e5e7eb;
  animation: slideUp 0.25s ease;
}

/* Header */
.id-help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.id-help-header button {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
}

/* Content */
.id-help-content {
  margin-top: 14px;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.id-help-content ol {
  margin: 10px 0 14px 18px;
}

/* Screenshot */
.id-help-image {
  margin: 12px 0;
  text-align: center;
}

.id-help-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

/* Example */
.id-example {
  background: rgba(255,255,255,0.08);
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  color: #60a5fa;
}

/* Desktop refinement */
@media (min-width: 768px) {
  .id-help-sheet {
    left: 50%;
    transform: translateX(-50%);
    max-width: 420px;
    border-radius: 22px;
    bottom: 15%;
  }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
