/* =====================================================================
   PariPulse — onlayn kazino
   Ranglar: qora + to'q qizil (referens logotipdan olingan)
   Mobile-first, CSS o'zgaruvchilari, to'liq moslashuvchan
   ===================================================================== */

/* ---------- CSS O'ZGARUVCHILARI (ranglar / oraliqlar) ---------- */
:root {
  /* Ranglar */
  --c-bg:        #0a0a0b;   /* asosiy qora fon */
  --c-bg-2:      #101012;   /* ikkilamchi fon */
  --c-surface:   #16161a;   /* kartalar sirti */
  --c-surface-2: #1d1d22;   /* hover / chiziqlar */
  --c-border:    #2a2a30;
  --c-red:       #c1121f;   /* to'q qizil — asosiy brend */
  --c-red-2:     #ff2d3f;   /* yorqin qizil aksent */
  --c-red-deep:  #7a0a12;   /* eng to'q qizil */
  --c-text:      #f5f5f7;
  --c-muted:     #9a9aa2;
  --c-white:     #ffffff;

  /* Oraliqlar */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  /* Radiuslar / soyalar / o'lchamlar */
  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 10px 30px rgba(0, 0, 0, .45);
  --shadow-red: 0 8px 26px rgba(193, 18, 31, .35);
  --header-h:  68px;
  --maxw:      1200px;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- BAZAVIY / RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
button { font-family: inherit; cursor: pointer; }

/* Fokus — barcha interaktiv elementlar uchun ko'rinadigan halqa (a11y) */
:focus-visible {
  outline: 3px solid var(--c-red-2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ekran o'quvchilar uchun yashirin matn */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Kontentga o'tish havolasi */
.skip-link {
  position: absolute; left: var(--sp-4); top: -60px; z-index: 200;
  background: var(--c-red); color: #fff; padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm); transition: top .2s var(--ease);
}
.skip-link:focus { top: var(--sp-4); }

/* ---------- LAYOUT YORDAMCHILARI ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-4); }
.container--narrow { max-width: 820px; }

.section { padding: var(--sp-7) 0; }
.section__head {
  display: flex; align-items: center; gap: var(--sp-3);
  flex-wrap: wrap; justify-content: space-between; margin-bottom: var(--sp-5);
}
.section__title {
  font-size: clamp(1.4rem, 4vw, 2rem);
  position: relative; padding-left: var(--sp-4);
}
.section__title::before {
  content: ""; position: absolute; left: 0; top: .1em; bottom: .1em;
  width: 5px; border-radius: 4px;
  background: linear-gradient(180deg, var(--c-red-2), var(--c-red-deep));
}

/* ---------- TUGMALAR ---------- */
.btn {
  --btn-bg: var(--c-surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: 12px 22px; border: 1px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: .95rem; color: var(--c-text);
  background: var(--btn-bg); transition: transform .12s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary {
  background: linear-gradient(135deg, var(--c-red-2), var(--c-red));
  color: #fff; box-shadow: var(--shadow-red);
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(193, 18, 31, .5); }
.btn--ghost { background: transparent; border-color: var(--c-border); }
.btn--ghost:hover { border-color: var(--c-red-2); color: var(--c-red-2); }

/* 18+ nishoni */
.badge-18 {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid var(--c-red-2); color: var(--c-red-2);
  font-weight: 900; font-size: .85rem;
}

/* =====================================================================
   HEADER (yopishqoq)
   ===================================================================== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 11, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--c-border); background: rgba(10, 10, 11, .96); }
.header__inner {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.logo img { width: auto; height: 40px; }

/* Navigatsiya — mobil: to'liq ekran panel */
.nav {
  position: fixed; inset: var(--header-h) 0 auto 0;
  background: var(--c-bg-2); border-bottom: 1px solid var(--c-border);
  padding: var(--sp-4); transform: translateY(-120%);
  transition: transform .3s var(--ease); visibility: hidden;
}
.nav.is-open { transform: translateY(0); visibility: visible; }
.nav__list { display: flex; flex-direction: column; gap: var(--sp-1); }
.nav__list a { display: block; padding: var(--sp-3) var(--sp-2); font-weight: 600; border-radius: var(--radius-sm); }
.nav__list a:hover { background: var(--c-surface); color: var(--c-red-2); }
.nav__auth { display: flex; gap: var(--sp-3); margin-top: var(--sp-4); }
.nav__auth .btn { flex: 1; }

/* Balans + Depozit plashkasi (yuqori o'ng) */
.deposit {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-left: auto; /* har doim o'ngga suriladi */
}
.deposit__bal {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 8px 14px; border-radius: 999px;
  background: var(--c-surface); border: 1px solid var(--c-border);
  font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.deposit__ico { width: 18px; height: 18px; color: var(--c-red-2); flex: none; }
.deposit__amt { font-variant-numeric: tabular-nums; }
.deposit__btn { padding: 9px 18px; }
/* Juda tor ekranlarda faqat Depozit tugmasi qoladi */
@media (max-width: 400px) { .deposit__bal { display: none; } }

/* Burger */
.burger {
  width: 44px; height: 44px; display: inline-flex; flex-direction: column;
  justify-content: center; gap: 5px; padding: 0 10px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
}
.burger span { height: 2px; background: var(--c-text); border-radius: 2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   HERO / BANNER KARUSELI
   ===================================================================== */
.hero { padding-top: var(--sp-5); }

/* Hero grid: mobil — ustma-ust; desktop — banner + yon lenta */
.hero__grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; align-items: stretch; }

/* Jonli yutuqlar — yon panel */
.wins-side {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: var(--sp-4);
  display: flex; flex-direction: column; min-height: 0;
}
.wins-side__head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.wins-side__head h2 { font-size: 1.05rem; }
.wins-side .wins { overflow-y: auto; gap: var(--sp-2); max-height: 260px;
  scrollbar-width: thin; scrollbar-color: var(--c-red-deep) transparent; }
.wins-side .wins::-webkit-scrollbar { width: 6px; }
.wins-side .wins::-webkit-scrollbar-thumb { background: var(--c-red-deep); border-radius: 6px; }
/* Yon lentada kompakt qatorlar */
.wins-side .wins li { padding: 8px 10px; gap: 10px; }
.wins-side .wins__ava { width: 30px; height: 30px; font-size: 1rem; }
.wins__meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.wins-side .wins__user, .wins-side .wins__game { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wins-side .wins__amt { font-size: .82rem; }

.carousel { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.carousel__track { display: flex; transition: transform .5s var(--ease); }
.slide { position: relative; flex: 0 0 100%; margin: 0; }
.slide img { width: 100%; aspect-ratio: 1200 / 420; object-fit: cover; }
.slide__cta { position: absolute; left: 5%; bottom: 8%; }

.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(10, 10, 11, .6); border: 1px solid var(--c-border);
  color: #fff; font-size: 1.6rem; line-height: 1; display: grid; place-items: center;
}
.carousel__btn:hover { background: var(--c-red); border-color: var(--c-red); }
.carousel__btn--prev { left: var(--sp-3); }
.carousel__btn--next { right: var(--sp-3); }
.carousel__dots {
  position: absolute; left: 0; right: 0; bottom: var(--sp-3);
  display: flex; gap: var(--sp-2); justify-content: center;
}
.carousel__dots button {
  width: 10px; height: 10px; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, .4); border: none; transition: width .2s var(--ease), background .2s var(--ease);
}
.carousel__dots button[aria-selected="true"] { width: 26px; border-radius: 6px; background: var(--c-red-2); }

/* =====================================================================
   KATEGORIYALAR (gorizontal scroll slider)
   ===================================================================== */
.cats {
  display: flex; gap: var(--sp-3); overflow-x: auto;
  padding-bottom: var(--sp-3); scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--c-red) transparent;
}
.cats::-webkit-scrollbar { height: 6px; }
.cats::-webkit-scrollbar-thumb { background: var(--c-red-deep); border-radius: 6px; }
.cat {
  scroll-snap-align: start; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  width: 108px; padding: var(--sp-4) var(--sp-3);
  background: linear-gradient(160deg, var(--c-surface), var(--c-bg-2));
  border: 1px solid var(--c-border); border-radius: var(--radius);
  transition: transform .15s var(--ease), border-color .2s var(--ease);
}
.cat:hover { transform: translateY(-4px); border-color: var(--c-red); }
.cat__ico { font-size: 1.9rem; }
.cat__name { font-size: .85rem; font-weight: 600; text-align: center; }

/* =====================================================================
   QIDIRUV + FILTR
   ===================================================================== */
.search {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: 999px; padding: 8px 16px; min-width: min(320px, 100%);
}
.search:focus-within { border-color: var(--c-red-2); }
.search__ico { width: 18px; height: 18px; color: var(--c-muted); flex: none; }
.search input {
  border: none; background: none; color: var(--c-text);
  font-size: .95rem; width: 100%; outline: none;
}
.search input::placeholder { color: var(--c-muted); }

.filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-5); }
.chip {
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .88rem;
  background: var(--c-surface); border: 1px solid var(--c-border); color: var(--c-muted);
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.chip:hover { color: var(--c-text); border-color: var(--c-red); }
.chip.is-active { background: linear-gradient(135deg, var(--c-red-2), var(--c-red)); color: #fff; border-color: transparent; }

/* =====================================================================
   O'YIN KARTALARI (qayta ishlatiladigan grid komponenti)
   ===================================================================== */
.games-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(2, 1fr);
}
.game-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.game-card:hover { transform: translateY(-5px); border-color: var(--c-red); box-shadow: var(--shadow); }
.game-card__media { position: relative; }
.game-card__media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.game-card__badge {
  position: absolute; top: var(--sp-2); left: var(--sp-2);
  background: var(--c-red); color: #fff; font-size: .7rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em;
}
.game-card__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10, 10, 11, .55); opacity: 0; transition: opacity .2s var(--ease);
}
.game-card:hover .game-card__play,
.game-card:focus-within .game-card__play { opacity: 1; }
.game-card__play .btn { pointer-events: auto; }
.game-card__body { padding: var(--sp-3) var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: 2px; flex: 1; }
.game-card__name { font-size: 1rem; font-weight: 700; }
.game-card__prov { font-size: .8rem; color: var(--c-muted); }
.game-card__rtp {
  margin-top: var(--sp-2); font-size: .78rem; font-weight: 700;
  color: var(--c-red-2); align-self: flex-start;
  padding: 2px 8px; border: 1px solid var(--c-red-deep); border-radius: 999px;
}
.games-empty { text-align: center; color: var(--c-muted); padding: var(--sp-6) 0; }

/* =====================================================================
   JACKPOT
   ===================================================================== */
.jackpot {
  background:
    radial-gradient(120% 120% at 80% 0%, rgba(193, 18, 31, .28), transparent 60%),
    var(--c-bg-2);
  border-top: 1px solid var(--c-border); border-bottom: 1px solid var(--c-border);
}
.jackpot__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap; }
.jackpot__eyebrow { color: var(--c-red-2); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 var(--sp-2); font-size: .8rem; }
.jackpot__sum { font-size: clamp(2rem, 8vw, 3.6rem); font-weight: 900; margin: var(--sp-3) 0; letter-spacing: -.02em; }
.jackpot__sum #jackpotCounter { color: var(--c-red-2); font-variant-numeric: tabular-nums; }
.jackpot__cur { font-size: .4em; color: var(--c-muted); font-weight: 700; }
.jackpot__hint { color: var(--c-muted); margin: 0 0 var(--sp-4); }
.jackpot__coin { font-size: clamp(4rem, 18vw, 9rem); animation: floaty 3s var(--ease) infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-14px) rotate(6deg); } }

/* =====================================================================
   JONLI YUTUQLAR LENTASI
   ===================================================================== */
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c-red-2); box-shadow: 0 0 0 0 rgba(255, 45, 63, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 63, .6); } 70% { box-shadow: 0 0 0 12px rgba(255, 45, 63, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 45, 63, 0); } }
.wins { display: flex; flex-direction: column; gap: var(--sp-2); }
.wins li {
  display: flex; align-items: center; gap: var(--sp-3);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-red); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4); animation: winIn .4s var(--ease);
}
@keyframes winIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.wins__ava { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface-2); font-size: 1.1rem; flex: none; }
.wins__user { font-weight: 700; }
.wins__game { color: var(--c-muted); font-size: .85rem; }
.wins__amt { margin-left: auto; font-weight: 800; color: var(--c-red-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* =====================================================================
   AKSIYALAR + TAYMERLAR
   ===================================================================== */
.promos { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.promo-card {
  background: linear-gradient(160deg, var(--c-surface), var(--c-bg-2));
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3);
}
.promo-card h3 { font-size: 1.15rem; }
.promo-card p { color: var(--c-muted); margin: 0; flex: 1; }
.timer {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.4rem;
  color: var(--c-red-2); letter-spacing: .04em;
  background: rgba(0,0,0,.35); border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); align-self: flex-start;
}
.promo-card .btn { align-self: flex-start; }

/* =====================================================================
   TO'LOV TIZIMLARI
   ===================================================================== */
.pays { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }
.pays img { transition: transform .15s var(--ease), filter .2s var(--ease); filter: saturate(.9); }
.pays img:hover { transform: translateY(-3px); filter: saturate(1.2); }

/* =====================================================================
   ISHONCH BLOKI
   ===================================================================== */
.trust { background: var(--c-bg-2); }
.trust__list { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.trust__item { display: flex; gap: var(--sp-4); align-items: center; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--sp-4); }
.trust__item img { width: 48px; height: 48px; flex: none; }
.trust__item h3 { font-size: 1.05rem; margin-bottom: 2px; }
.trust__item p { color: var(--c-muted); margin: 0; font-size: .9rem; }

/* =====================================================================
   FAQ AKKORDEON
   ===================================================================== */
.accordion { display: flex; flex-direction: column; gap: var(--sp-3); }
.acc { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; }
.acc h3 { margin: 0; }
.acc__btn {
  width: 100%; text-align: left; background: none; border: none; color: var(--c-text);
  font-size: 1rem; font-weight: 700; padding: var(--sp-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.acc__ico { font-size: 1.5rem; color: var(--c-red-2); transition: transform .25s var(--ease); flex: none; }
.acc__btn[aria-expanded="true"] .acc__ico { transform: rotate(45deg); }
.acc__panel {
  max-height: 0; overflow: hidden; transition: max-height .3s var(--ease);
}
.acc__panel p { margin: 0; padding: 0 var(--sp-4) var(--sp-4); color: var(--c-muted); }

/* =====================================================================
   FUTER
   ===================================================================== */
.footer { background: var(--c-bg-2); border-top: 1px solid var(--c-border); padding-top: var(--sp-7); }
.footer__grid { display: grid; gap: var(--sp-5); grid-template-columns: 1fr; padding-bottom: var(--sp-6); }
.footer__brand p { color: var(--c-muted); margin: var(--sp-3) 0; font-size: .9rem; }
.footer__col h3 { font-size: 1rem; margin-bottom: var(--sp-3); }
.footer__col ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer__col a { color: var(--c-muted); font-size: .9rem; }
.footer__col a:hover { color: var(--c-red-2); }
.footer__legal { border-top: 1px solid var(--c-border); padding: var(--sp-4) 0; }
.footer__legal p { color: var(--c-muted); font-size: .82rem; margin: var(--sp-2) 0; }
.footer__legal a { color: var(--c-red-2); }
.footer__copyright { opacity: .8; }

/* =====================================================================
   MOSLASHUVCHANLIK (planshet / desktop)
   ===================================================================== */
@media (min-width: 600px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); }
  .promos { grid-template-columns: repeat(3, 1fr); }
  .trust__list { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .games-grid { grid-template-columns: repeat(4, 1fr); }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; }

  /* Hero: banner + yondagi jonli yutuqlar lentasi (balandlik bannerga bog'lanadi) */
  .hero__grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .wins-side .wins { flex: 1 1 0; min-height: 0; max-height: none; }

  /* Desktop navigatsiya — gorizontal, burger yashiriladi */
  .burger { display: none; }
  .nav {
    position: static; transform: none; visibility: visible;
    background: none; border: none; padding: 0;
    display: flex; align-items: center; gap: var(--sp-5);
  }
  .nav__list { flex-direction: row; gap: var(--sp-2); }
  .nav__auth { margin-top: 0; }
  .nav__auth .btn { flex: initial; }
}

/* Harakatni kamaytirish sozlamasi — animatsiyalarni o'chirish (a11y) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
