/* Yuksalish efir — mijoz sahifalari (bosh sahifa va efir xonasi). Mobil birinchi. */
:root {
  --brand: #1d4f9c; --brand-d: #143a75; --brand-l: #e9f0fb;
  --bg: #f3f5f9; --card: #fff; --text: #142033; --muted: #66718a; --line: #e3e8f0;
  --ok: #17915a; --live: #e5322d; --r: 16px; --sh: 0 6px 24px rgba(20, 32, 51, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- Yuqori panel ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--brand); text-decoration: none; letter-spacing: .3px; white-space: nowrap; }
.brand img { height: 36px; width: auto; }
.topbar .title { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill.live { background: var(--live); color: #fff; }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.2s infinite; }
.pill.test { background: #b26a00; color: #fff; }
.pill.count { background: var(--brand-l); color: var(--brand); }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Tugmalar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 14px 20px; font-weight: 700; font-size: 16px; text-decoration: none; background: var(--brand); color: #fff; transition: transform .1s, filter .15s; text-align: center; line-height: 1.25; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn.alt { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 2px var(--brand); }
.btn.green { background: var(--ok); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }

/* ---------- Kartalar ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 20px; }
.card h2, .card h3 { margin: 0 0 12px; line-height: 1.25; }
.section { margin: 18px 0; }
.section-title { font-size: 22px; margin: 32px 0 14px; }

/* ---------- Teskari sanoq ---------- */
.cd { display: flex; gap: 8px; }
.cd div { background: var(--brand); color: #fff; border-radius: 12px; min-width: 64px; padding: 8px 6px 6px; text-align: center; }
.cd b { display: block; font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd span { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- Ro'yxatlar, galereya, spiker ---------- */
.bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.bullets li { display: flex; gap: 12px; align-items: flex-start; }
.bullets li::before { content: "✓"; flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--brand-l); color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-top: 1px; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 230px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; scroll-snap-align: start; cursor: zoom-in; background: #dde3ec; }
.speaker { display: flex; gap: 16px; align-items: center; }
.speaker img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-height: 92vh; border-radius: 8px; }

/* ---------- Video quti ---------- */
.player { position: relative; background: #0b1220; aspect-ratio: 16 / 9; width: 100%; overflow: hidden; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 20px; gap: 12px; }
.player .pbtn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(255,255,255,.95); color: var(--brand); border: 0; border-radius: 999px; padding: 14px 24px; font-weight: 800; font-size: 17px; box-shadow: 0 6px 26px rgba(0,0,0,.35); z-index: 3; }
.player .corner { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: flex; gap: 8px; }
.player .corner button { background: rgba(0,0,0,.55); color: #fff; border: 0; border-radius: 8px; padding: 7px 11px; font-size: 13px; font-weight: 600; backdrop-filter: blur(4px); }
.player .corner .golive { background: var(--live); }
.player .banner { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 3; background: rgba(255,255,255,.97); border-radius: 12px; padding: 10px 14px; display: flex; gap: 12px; align-items: center; font-weight: 600; box-shadow: var(--sh); animation: down .35s ease-out; }
.player .banner img { height: 52px; border-radius: 8px; }
@keyframes down { from { transform: translateY(-16px); opacity: 0; } }
@keyframes up { from { transform: translateY(14px); opacity: 0; } }

/* ---------- Efir xonasi ---------- */
.room { display: grid; grid-template-columns: 1fr; gap: 0; }
.main { min-width: 0; }
.below { padding: 14px 16px; display: grid; gap: 14px; }
.ctas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ctas .btn { animation: up .35s ease-out; }

.waiting { background: linear-gradient(135deg, var(--brand), var(--brand-d)); color: #fff; padding: 22px 18px; }
.waiting h1 { margin: 0 0 4px; font-size: 22px; line-height: 1.25; }
.waiting .when { opacity: .9; margin-bottom: 14px; }
.waiting .cd div { background: rgba(255,255,255,.16); }

/* So'rovnoma */
.poll { background: #fff; border-radius: var(--r); box-shadow: 0 0 0 2px var(--brand), var(--sh); padding: 16px; animation: up .35s ease-out; transition: opacity .5s, transform .5s; }
.poll.out { opacity: 0; transform: translateY(8px); }
.poll .q { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.poll .q b { font-size: 17px; line-height: 1.3; }
.poll .timer { flex: none; font-weight: 800; color: var(--brand); background: var(--brand-l); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.poll .tag { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 4px; }
.poll .opts { display: grid; gap: 8px; }
.poll .opts.img { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.opt { position: relative; overflow: hidden; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; text-align: left; font-weight: 600; color: var(--text); transition: border-color .15s, transform .1s; }
.opt:hover:not(:disabled) { border-color: var(--brand); }
.opt:active:not(:disabled) { transform: scale(.98); }
.opt img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 8px; }
.opt .bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brand-l); transition: width .6s; z-index: 0; }
.opt > span { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; }
.opt.chosen { border-color: var(--brand); }
.opt:disabled { cursor: default; }
.poll .thanks { display: flex; gap: 12px; align-items: center; }
.poll .thanks .ic { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; }
.poll .thanks b { display: block; font-size: 17px; }

/* Shaxsiy taklif */
.offer { background: linear-gradient(135deg, #0f7a4c, #0b5a39); color: #fff; border-radius: var(--r); padding: 20px 18px; text-align: center; box-shadow: var(--sh); animation: up .35s ease-out; }
.offer h2 { margin: 0 0 4px; font-size: 20px; }
.offer .cd { justify-content: center; margin: 12px 0 6px; }
.offer .cd div { background: rgba(255,255,255,.16); }
.offer p { margin: 10px 0 16px; opacity: .95; }
.offer .btn { background: #fff; color: #0b5a39; min-width: 240px; }

.info { display: grid; gap: 14px; padding: 0 16px 18px; grid-template-columns: minmax(0, 1fr); }

/* Chat */
.chat { background: #fff; display: flex; flex-direction: column; min-height: 380px; border-top: 1px solid var(--line); }
.chat-head { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.pinned { background: #fff7e0; padding: 10px 16px; font-size: 14px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; }
.pinned::before { content: "📌"; }
.msgs { flex: 1; overflow-y: auto; padding: 10px 12px; max-height: 60vh; scroll-behavior: smooth; }
.m { display: flex; gap: 10px; padding: 6px 4px; animation: up .25s ease-out; }
.m .av { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #dfe5ef; color: #45536b; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.m.mod .av { background: var(--brand); color: #fff; }
.m .body { min-width: 0; flex: 1; }
.m .who { font-weight: 700; font-size: 14px; }
.m.mod .who { color: var(--brand); }
.m.mod .who::after { content: " ✔"; font-size: 12px; }
.m .txt { word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; }
.m.personal .body { background: var(--brand-l); border-radius: 12px; padding: 8px 12px; }
.m .wait { color: var(--muted); font-size: 12px; }
.send { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; position: sticky; bottom: 0; }
.send input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 16px; outline: none; }
.send input:focus { border-color: var(--brand); }
.send button { border: 0; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; padding: 0 18px; }
.hint { color: var(--live); font-size: 13px; padding: 0 16px; min-height: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #142033; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 70; box-shadow: var(--sh); animation: up .3s ease-out; max-width: 90vw; text-align: center; }

@media (min-width: 960px) {
  .room { grid-template-columns: minmax(0, 1fr) 370px; max-width: 1400px; margin: 0 auto; }
  .main { padding: 16px; }
  .player { border-radius: var(--r); }
  .below { padding: 14px 0; }
  .info { padding: 0 0 18px; }
  .chat { height: calc(100vh - 61px); position: sticky; top: 61px; border-top: 0; border-left: 1px solid var(--line); }
  .msgs { max-height: none; }
  .waiting { border-radius: var(--r); }
}

/* ---------- Bosh sahifa (ro'yxat) ---------- */
.hero { background: linear-gradient(140deg, var(--brand) 0%, var(--brand-d) 100%); color: #fff; padding: 34px 0 40px; }
.hero .wrap { display: grid; gap: 26px; }
.hero .kicker { display: inline-block; background: rgba(255,255,255,.16); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.hero h1 { font-size: 30px; line-height: 1.18; margin: 14px 0 10px; }
.hero .sub { font-size: 18px; opacity: .92; margin: 0 0 18px; }
.hero .when { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 14px; }
.hero .cd div { background: rgba(255,255,255,.16); }
.hero .media { border-radius: var(--r); overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.3); position: relative; background: #0b1220; aspect-ratio: 16 / 9; }
.hero .media video, .hero .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero .media .snd { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.reg { background: #fff; color: var(--text); border-radius: var(--r); padding: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.reg h3 { margin: 0 0 4px; font-size: 20px; }
.reg label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.reg input { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 17px; outline: none; }
.reg input:focus { border-color: var(--brand); }
.phone-in { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.phone-in:focus-within { border-color: var(--brand); }
.phone-in span { padding: 0 4px 0 14px; font-size: 17px; font-weight: 600; color: var(--muted); }
.phone-in input { border: 0; padding-left: 4px; }
.reg .btn { margin-top: 16px; }
.reg .note { font-size: 13px; color: var(--muted); margin: 10px 0 0; text-align: center; }
.err { color: var(--live); font-size: 14px; margin-top: 8px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.footer { background: #0f1b2e; color: #c9d3e3; padding: 26px 0; margin-top: 36px; font-size: 14px; }
.footer a { color: #fff; }

@media (min-width: 900px) {
  .hero { padding: 54px 0 60px; }
  .hero .wrap { grid-template-columns: 1.1fr .9fr; align-items: center; }
  .hero h1 { font-size: 42px; }
  .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.player .center h2 { margin: 0; font-size: 22px; max-width: 560px; }
.subs { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); max-width: 88%; background: rgba(0,0,0,.72); color: #fff; font-size: clamp(14px, 2.4vw, 22px); line-height: 1.35; padding: 6px 14px; border-radius: 8px; text-align: center; z-index: 2; white-space: pre-line; }
.grid2 > *, .info > *, .card { min-width: 0; }
html, body { overflow-x: hidden; }

.grid2 .wide { grid-column: 1 / -1; }
.gallery { scrollbar-width: thin; }
@media (min-width: 900px) { .gallery { grid-auto-columns: minmax(220px, 260px); } }
@media (min-width: 960px) { #waitBox .player { border-radius: var(--r) var(--r) 0 0; } #waitBox .waiting { border-radius: 0 0 var(--r) var(--r); } }
.player .pbtn { white-space: nowrap; }
@media (max-width: 600px) {
  .player .corner { top: 8px; bottom: auto; right: 8px; }
  .player .corner button { padding: 5px 9px; }
  .subs { bottom: 8px; font-size: 13.5px; max-width: 94%; padding: 4px 10px; }
  .player .pbtn { font-size: 15px; padding: 11px 18px; }
  .topbar .title { display: none; }
}
