/* =========================================================
   RESPONSIVE — Barcha qurilmalar (Mobil, Tablet, PC, TV) uchun
   MUKAMMAL VA XATOSIZ VERSIYASI
   ========================================================= */

/* Jajjigina telefonlar (iPhone SE va kichik ekranlar) */
@media (max-width: 380px) {
  .chip-row { gap: 10px; }
  .chip-name { font-size: 10.5px; }
  .hero-title h1 { font-size: 22px; }
  .balance-card .amount { font-size: 28px; }
  .tab span { font-size: 10px; }
  .svc-card { padding: 12px; }
  .svc-icon { width: 36px; height: 36px; }
  .section { padding: 16px 12px 0; }
  .balance-card { margin: -30px 12px 0; padding: 16px; }
}

/* Planshetlar uchun (iPad va yirik telefonlar) */
@media (min-width: 600px) {
  .chip-row { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .svc-card { align-items: flex-start; height: 100%; }
  .acc-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .gd-game-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Katta ekranlar: Desktop kompyuterlar va Noutbuklar */
@media (min-width: 860px) {
  body { display: flex; justify-content: center; background: var(--bg-hero-b); padding-top: 0; align-items: flex-start; }
  #app { width: 100%; max-width: 900px; padding-bottom: 48px; background: var(--bg); min-height: 100vh; position: relative; box-shadow: 0 0 50px rgba(0,0,0,0.08); margin: 0 auto; }

  .tabbar { position: sticky; top: 0; bottom: auto; padding: 20px 30px 0; background: transparent; z-index: 40; justify-content: flex-end; }
  .tabbar-inner { max-width: 480px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

  .hero { border-radius: 0 0 32px 32px; padding: 20px 40px 70px; }
  .balance-card { margin: -40px 30px 0; padding: 24px 30px; }
  .section { padding: 30px 30px 0; }

  .chip-row { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .gd-game-grid { grid-template-columns: repeat(5, 1fr); }
  .list { grid-template-columns: repeat(3, 1fr); gap: 16px; }

  /* Desktop uchun karuselni ixchamlashtirish (kattalashib yoyilib ketmaydi) */
  .ob-slide { flex: 0 0 320px; width: 320px; margin-right: 16px; }

  /* Bottom sheet larni markazdagi oynaga (Modal) o'tkazish */
  .sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    transform: translate(-50%, -46%) scale(0.95); opacity: 0;
    width: 90%; max-width: 460px;
    border-radius: 28px; padding: 26px 30px 30px;
    border-bottom: 1px solid var(--border);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
  }
  .sheet.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  .sheet-handle { display: none; }
  .sheet-close { display: flex; background: var(--card-soft); transition: transform 0.2s; }
  .sheet-close:hover { transform: scale(1.1); }

  .receipt-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%;
    transform: translate(-50%, -46%) scale(0.95); opacity: 0;
    width: 90%; max-width: 420px;
    border-radius: 28px; padding: 24px 10px;
  }
  .receipt-sheet.show { transform: translate(-50%, -50%) scale(1); opacity: 1; }


/* DESKTOP — PREMIUM GLASS MODAL */
@media (min-width: 860px) {

  html body .fullpage {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: rgba(5, 7, 18, 0.48) !important;
    backdrop-filter: blur(16px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.2) !important;

    padding: 32px 24px;
    opacity: 0;
    transform: scale(1.025);
    pointer-events: none;

    transition:
      opacity .28s ease,
      transform .38s cubic-bezier(.22,1,.36,1);
  }

  html body .fullpage.show {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  html body .fullpage-header {
    width: 100%;
    max-width: 800px;
    position: relative;
    margin-top: auto;

    padding: 20px 28px;
    border-radius: 26px 26px 0 0;

    background: var(--card);
    border: 1px solid var(--border);
    border-bottom: 0;

    box-shadow: 0 -12px 55px rgba(0,0,0,.15);
  }

  html body .fullpage-body {
    width: 100%;
    max-width: 800px;
    margin: 0 auto auto;
    padding: 30px 32px 34px;
    max-height: calc(100dvh - 150px);
    overflow-y: auto;

    background: var(--card);
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 26px 26px;

    box-shadow:
      0 35px 100px rgba(0,0,0,.38),
      0 10px 35px rgba(0,0,0,.18);
  }

  /* Xizmat kartalari */
  html body #platformPage .svc-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    background: var(--card-soft);
    border: 1px solid var(--border);
    border-radius: 18px;

    transition:
      transform .3s cubic-bezier(.2,.8,.2,1),
      border-color .25s ease,
      box-shadow .3s ease;
  }

  /* Sichqoncha ortidan yorug'lik */
  html body #platformPage .svc-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;

    background: radial-gradient(
      220px circle at var(--mx, 50%) var(--my, 50%),
      rgba(139,124,246,.19),
      transparent 75%
    );

    opacity: 0;
    transition: opacity .25s ease;
  }

  html body #platformPage .svc-card > * {
    position: relative;
    z-index: 1;
  }

  @media (hover: hover) {
    html body #platformPage .svc-card:hover {
      transform: translateY(-4px);
      border-color: rgba(139,124,246,.65);

      box-shadow:
        0 14px 30px rgba(0,0,0,.16),
        0 0 0 1px rgba(139,124,246,.12);
    }

    html body #platformPage .svc-card:hover::after {
      opacity: 1;
    }
  }
}


  #toast { bottom: 40px; font-size: 15px; padding: 14px 24px; }
  .active-topup-float { bottom: 40px; }
}

/* Juda katta TV va Monitorlar (1400px+) */
@media (min-width: 1400px) {
  /* MUHIM TUZATISH: align-items: center olib tashlandi, yo'qsa ekranga sig'maganda tepa va pastki qismi umuman skroll bo'lmay qirqilib qolardi */
  body { justify-content: center; align-items: flex-start; background: var(--bg-hero-b); }
  #app { max-width: 1200px; border-radius: 32px; min-height: 90vh; margin: 4vh auto; overflow: hidden; border: 1px solid var(--glass-border); box-shadow: 0 20px 60px rgba(0,0,0,0.1); }
  .chip-row { grid-template-columns: repeat(8, 1fr); gap: 24px; }
  .gd-game-grid { grid-template-columns: repeat(8, 1fr); }
  .list { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .acc-stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .fullpage-header, .fullpage-body { max-width: 800px; }
}

.confetti-layer{position:fixed;inset:0;pointer-events:none;z-index:200;overflow:hidden;}
.confetti-piece{position:absolute;top:-10px;border-radius:2px;opacity:0;animation:confettiFall linear forwards;}
@keyframes confettiFall{
  0%{opacity:1;transform:translateY(0) rotate(0deg);}
  100%{opacity:0;transform:translateY(110vh) rotate(720deg);}
}

/* ---- Muvaffaqiyat porlash effekti (order/topup uchun umumiy) ---- */
.success-glow-layer{position:fixed;inset:0;pointer-events:none;z-index:199;display:flex;align-items:center;justify-content:center;}
.success-glow-ring{
  position:absolute; width:40px; height:40px; border-radius:50%;
  border:3px solid var(--mint);
  animation:successRing 1s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes successRing{
  0%{width:40px;height:40px;opacity:.9;border-width:6px;}
  100%{width:340px;height:340px;opacity:0;border-width:1px;}
}
.success-glow-core{
  position:absolute; width:90px; height:90px; border-radius:50%;
  background:radial-gradient(circle, rgba(23,178,135,.55), rgba(23,178,135,0) 70%);
  animation:successCore .9s ease-out forwards;
}
@keyframes successCore{
  0%{transform:scale(.3);opacity:0;}
  35%{transform:scale(1.15);opacity:1;}
  100%{transform:scale(1.6);opacity:0;}
}
.success-glow-check{
  position:relative; width:64px;height:64px;border-radius:50%;
  background:var(--mint); color:#fff; display:flex;align-items:center;justify-content:center;
  box-shadow:0 12px 30px -8px rgba(23,178,135,.65);
  animation:successPop .55s cubic-bezier(.34,1.56,.64,1) forwards;
}
.success-glow-check svg{width:30px;height:30px;}
@keyframes successPop{
  0%{transform:scale(0);opacity:0;}
  60%{transform:scale(1.18);opacity:1;}
  100%{transform:scale(1);opacity:1;}
}
.success-glow-fadeout{animation:successFadeOut .35s ease forwards;}
@keyframes successFadeOut{to{opacity:0;}}

