/* AiVideoUz — Apple uslubidagi yorqin dizayn. Kompyuter va telefon bir xil. */
:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #6b7a90;
  --line: #e3e9f3;
  --blue: #0a66ff;
  --blue-soft: #eaf2ff;
  --blue-ink: #0a4fc4;
  --green: #22c55e;
  --warn-bg: #fff6e0;
  --warn: #8a5a00;
  --r: 20px;
  --shadow: 0 1px 2px rgba(10,20,40,.04), 0 8px 24px rgba(10,20,40,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 34px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 10px; max-width: 560px; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0; }

.page { max-width: 1120px; margin: 0 auto; padding: 18px 24px 64px; }

/* header */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 36px; height: 36px; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 17px; }
.bell .dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; border: 2px solid var(--card); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #0a66ff, #6aa6ff); color: #fff; display: grid; place-items: center; font-weight: 700; box-shadow: var(--shadow); }

/* pills nav */
.pills { display: flex; gap: 8px; overflow-x: auto; margin: 18px 0 4px; padding-bottom: 4px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: 0 0 auto; padding: 10px 16px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.pill.active { background: var(--blue); color: #fff; }
.pill.off { opacity: .45; }

.notice { background: var(--warn-bg); color: var(--warn); border-radius: 14px; padding: 12px 16px; margin: 14px 0 0; font-size: 14px; }
.hidden { display: none !important; }

/* hero */
.hero { position: relative; margin-top: 16px; border-radius: var(--r); padding: 34px 32px; overflow: hidden; background: linear-gradient(120deg, #cfe2ff 0%, #e9f2ff 55%, #f7fbff 100%); box-shadow: var(--shadow); min-height: 300px; display: flex; align-items: center; }
.hero-text { position: relative; z-index: 1; max-width: 520px; }
.badge { display: inline-block; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 6px 10px; border-radius: 999px; }
.hero p { margin: 0; color: #2a3b55; font-size: 15px; }
.cta { display: inline-block; margin-top: 18px; background: var(--blue); color: #fff; padding: 13px 22px; border-radius: 14px; font-weight: 700; font-size: 15px; box-shadow: 0 10px 24px rgba(10,102,255,.3); }
.hero-art { position: absolute; right: -40px; top: -30px; bottom: -30px; width: 52%; }
.shape { position: absolute; border-radius: 50%; }
.s1 { width: 320px; height: 320px; right: 60px; top: 40px; background: radial-gradient(circle at 35% 35%, #ffffff, #8fb8ff 60%, #3d7dff); opacity: .9; }
.s2 { width: 160px; height: 160px; right: 220px; bottom: 30px; background: radial-gradient(circle at 35% 35%, #ffffff, #b3d0ff 60%, #6aa6ff); opacity: .8; }

/* blocks */
.block { margin-top: 28px; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.link { color: var(--blue); font-size: 14px; font-weight: 600; }

/* models */
.models { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.model { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 10px 14px; text-align: center; cursor: pointer; color: var(--text); font: inherit; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; }
.model:hover:not(.disabled) { transform: translateY(-1px); }
.model .mark { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 14px; background: var(--blue-soft); display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--blue-ink); }
.model b { display: block; font-size: 14px; font-weight: 700; }
.model .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.model.selected { box-shadow: 0 0 0 2px var(--blue), var(--shadow); }
.model.selected::after { content: "✓"; position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.model.disabled { opacity: .5; cursor: default; }
.model .soon { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

/* create card */
.card { background: var(--card); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.create { margin-top: 28px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; background: var(--bg); padding: 5px; border-radius: 14px; margin-bottom: 18px; }
.tab { flex: 1; min-width: 130px; padding: 11px 12px; border-radius: 11px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tab.active { background: var(--blue); color: #fff; }
.tab.off { opacity: .5; cursor: default; }

.prompt-box { background: var(--bg); border-radius: 16px; padding: 16px; }
.prompt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.prompt-title { font-weight: 700; font-size: 15px; }
.ghost { font-size: 13px; font-weight: 600; color: var(--blue); background: var(--blue-soft); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
textarea, input { width: 100%; background: transparent; color: var(--text); border: 0; font: inherit; font-size: 16px; padding: 0; resize: vertical; }
textarea:focus, input:focus { outline: none; }
#prompt { min-height: 72px; }
.counter { text-align: right; font-size: 12px; color: var(--muted); }
.field { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.field textarea, .field input { margin-top: 6px; background: var(--bg); border-radius: 14px; padding: 12px 14px; }

.chips-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.opt { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.opt small { display: block; font-size: 12px; color: var(--muted); }
.opt b { font-size: 15px; font-weight: 700; }

.generate { width: 100%; margin-top: 16px; padding: 16px 20px; border: 0; border-radius: 16px; background: var(--blue); color: #fff; font: inherit; font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; box-shadow: 0 10px 24px rgba(10,102,255,.28); }
.generate:hover { background: #0558e6; }
.generate:disabled { opacity: .5; cursor: default; }
.price { background: rgba(255,255,255,.2); border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project { position: relative; border-radius: 18px; min-height: 160px; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; overflow: hidden; box-shadow: var(--shadow); background: linear-gradient(160deg, #bcd6ff, #6aa6ff); color: #fff; }
.project.p2 { background: linear-gradient(160deg, #ffd9b3, #ff9f5a); }
.project.p3 { background: linear-gradient(160deg, #c9d8ff, #3f6fe0); }
.project .ok { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.project .title { font-size: 13px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.2); }
.project .meta { display: flex; justify-content: space-between; font-size: 12px; background: rgba(0,0,0,.35); padding: 4px 8px; border-radius: 8px; margin-top: 6px; }
.empty { grid-column: 1 / -1; color: var(--muted); font-size: 14px; padding: 14px 2px; }

/* balance */
.wallet { margin-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.wallet-left { display: flex; align-items: center; gap: 14px; }
.wallet-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 20px; }
.label { font-size: 13px; color: var(--muted); }
.amount { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.sub-amount { font-size: 13px; color: var(--muted); }
.btn-primary { background: var(--blue); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 20px rgba(10,102,255,.25); }

/* topup */
.topup { margin-top: 18px; }
.topup h2 { margin-bottom: 4px; }
.payments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.pay { background: var(--bg); border-radius: 14px; padding: 14px 6px; text-align: center; font-weight: 800; font-size: 12px; letter-spacing: .04em; color: var(--text); }
.topup form { display: flex; flex-direction: column; gap: 4px; }
.topup .field input { background: var(--bg); border-radius: 14px; padding: 13px 14px; font-size: 16px; }
.topup .generate { margin-top: 12px; justify-content: center; }

/* premium */
.premium { margin-top: 18px; background: linear-gradient(120deg, #eaf2ff, #f7fbff); border-radius: var(--r); padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); }
.premium-title { font-weight: 800; font-size: 16px; }
.chev { font-size: 26px; color: var(--blue); font-weight: 700; }

/* mobile */
@media (max-width: 900px) {
  .page { padding: 12px 14px 56px; }
  h1 { font-size: 26px; }
  .hero { padding: 24px 20px; min-height: 260px; }
  .hero-art { opacity: .35; }
  .models { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .projects { grid-template-columns: 1fr 1fr; gap: 10px; }
  .chips-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .opt { padding: 10px; }
  .payments { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .models { grid-template-columns: repeat(2, 1fr); }
  .chips-row { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .s1 { width: 220px; height: 220px; }
  .s2 { display: none; }
}

/* ---- AI chat ---- */
.chat { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.chat-head h2 { margin-bottom: 4px; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; }
.sug { border: 0; background: var(--blue-soft); color: var(--blue-ink); padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.messages { background: var(--bg); border-radius: 18px; padding: 16px; height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 82%; padding: 11px 14px; border-radius: 18px; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.bubble.ai { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.composer { display: flex; align-items: flex-end; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 8px 8px 8px 16px; box-shadow: var(--shadow); }
.composer textarea { flex: 1; min-height: 24px; max-height: 120px; padding: 8px 0; background: transparent; border: 0; resize: none; font: inherit; font-size: 15px; color: var(--text); }
.composer textarea:focus { outline: none; }
.send { width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; font-size: 16px; cursor: pointer; }
.send:disabled { opacity: .5; cursor: default; }
