/* AiResovia Voice Over design system: shared by the website and the app. */
:root {
  --bg: #09090d;
  --bg-2: #101017;
  --panel: #13131b;
  --card: #191922;
  --card-2: #20202b;
  --border: #272735;
  --border-2: #34344a;
  --text: #ededf4;
  --muted: #9b9bb2;
  --faint: #6b6b82;
  --accent: #2f7bf5;
  --accent-2: #12c9c1;
  --ok: #3ddc97;
  --warn: #ffb547;
  --error: #ff6b6b;
  --grad: linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: Inter, "Noto Sans Devanagari", system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tiny { font-size: 12px; }
.small { font-size: 13px; }
.error { color: var(--error); min-height: 1.2em; margin: 0; }
.ok { color: var(--ok); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 28px 0 12px; }
h3 { font-size: 15px; margin: 0 0 6px; }

/* Buttons and inputs */
button, .btn {
  font: inherit; font-weight: 500; border: 1px solid var(--border-2); background: var(--card-2); color: var(--text);
  padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  transition: border-color .15s, transform .05s, opacity .15s;
}
button:hover, .btn:hover { border-color: var(--accent); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary, button.primary { background: var(--grad); border: none; font-weight: 600; color: #fff; }
.btn-ghost, button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover, button.ghost:hover { color: var(--text); border-color: var(--border); }
.btn-danger, button.danger { color: var(--error); }
.btn-lg { padding: 13px 22px; font-size: 16px; border-radius: 12px; }
.btn-sm, button.sm { padding: 5px 10px; font-size: 13px; }
input, select, textarea {
  font: inherit; width: 100%; background: var(--bg-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=range] { padding: 0; accent-color: var(--accent); background: none; border: none; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
input[type=file] { padding: 8px; }
label { display: block; margin-bottom: 14px; font-weight: 500; font-size: 14px; }
label > select, label > input, label > textarea { margin-top: 6px; font-weight: 400; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); }
label.check input { margin-top: 4px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.tag {
  font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 99px; background: var(--bg-2);
  border: 1px solid var(--border); color: var(--muted); display: inline-block; white-space: nowrap;
}
.tag.accent { color: #b9d4ff; border-color: #2b4f8f; background: #12203a; }
.tag.ok { color: var(--ok); border-color: #1f5b44; background: #0f2219; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.brand { font-weight: 700; font-size: 18px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand .logo {
  width: 28px; height: 28px; border-radius: 8px; background: var(--grad); display: grid; place-items: center;
  font-size: 15px; color: #fff;
}
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table td, .table th { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
pre.code { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; overflow-x: auto; font-size: 13px; margin: 0; }

/* Toasts and modal */
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 100; max-width: calc(100vw - 32px); }
.toast { background: var(--card-2); border: 1px solid var(--border-2); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: in .2s ease-out; }
.toast.error { border-left-color: var(--error); }
.toast.ok { border-left-color: var(--ok); }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal { width: 100%; max-width: 460px; box-shadow: var(--shadow); }

/* ---------- Website ---------- */
.site-nav { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: rgba(9, 9, 13, .75); border-bottom: 1px solid var(--border); }
.site-nav .inner, .section .inner, .site-footer .inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.site-nav .inner { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav .links { display: flex; gap: 24px; font-size: 14px; color: var(--muted); }
.site-nav .links a { text-decoration: none; }
.site-nav .links a:hover { color: var(--text); }
.hero { padding: 90px 0 60px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 600px; z-index: -1;
  background: radial-gradient(closest-side, rgba(47, 123, 245, .28), transparent), radial-gradient(closest-side at 70% 40%, rgba(18, 201, 193, .16), transparent);
}
.hero h1 { font-size: clamp(36px, 6vw, 64px); margin: 18px auto 18px; max-width: 900px; letter-spacing: -0.03em; }
.hero p.lead { font-size: clamp(16px, 2vw, 20px); color: var(--muted); max-width: 680px; margin: 0 auto 30px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--card); font-size: 13px; color: var(--muted); }
.demo { max-width: 860px; margin: 50px auto 0; text-align: left; padding: 0; overflow: hidden; }
.demo-head { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.demo-head i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); }
.demo-body { display: grid; grid-template-columns: 1fr 240px; }
.demo-text { padding: 22px; font-size: 18px; line-height: 1.7; min-height: 180px; }
.demo-side { border-left: 1px solid var(--border); padding: 18px; display: grid; gap: 10px; align-content: start; font-size: 13px; }
.demo-side .opt { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.demo-side .opt.sel { border-color: var(--accent); background: #12203a; }
.wave { display: flex; align-items: center; gap: 3px; height: 40px; padding: 0 22px 22px; }
.wave span { flex: 1; background: var(--grad); border-radius: 2px; opacity: .85; animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 50% { transform: scaleY(.35); } }
.section { padding: 80px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-title h2 { font-size: clamp(26px, 3.5vw, 38px); margin: 0 0 12px; }
.section-title p { color: var(--muted); font-size: 17px; margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #12203a; font-size: 20px; margin-bottom: 14px; }
.feature p { color: var(--muted); margin: 0; font-size: 14px; }
.langs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.langs span { padding: 10px 18px; border-radius: 99px; border: 1px solid var(--border-2); background: var(--card); font-size: 15px; }
.langs span.hl { border-color: var(--accent); background: #12203a; }
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.price-card { display: flex; flex-direction: column; gap: 10px; }
.price-card.popular { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.price-card .price { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.price-card ul { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 8px; font-size: 14px; color: var(--muted); flex: 1; }
.price-card li::before { content: "✓  "; color: var(--ok); }
.price-card li.no::before { content: "–  "; color: var(--faint); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps .card::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); font-weight: 700; margin-bottom: 12px; }
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { color: var(--muted); margin: 10px 0 0; }
.cta-band { text-align: center; }
.cta-band .card { padding: 50px 20px; background: linear-gradient(135deg, #12203a, #2a1424); border-color: var(--border-2); }
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--muted); font-size: 14px; }
.site-footer .inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.legal { max-width: 760px; margin: 0 auto; padding: 50px 20px 80px; }
.legal h1 { font-size: 34px; margin-bottom: 4px; }
.legal p, .legal li { color: #cfcfdd; }

/* ---------- App ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card form { display: grid; gap: 10px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button { border: none; background: none; color: var(--muted); padding: 7px 14px; }
.seg button.active { background: var(--card-2); color: var(--text); }
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin: 14px 10px 6px; }
.sidebar nav button { justify-content: flex-start; background: none; border: 1px solid transparent; color: var(--muted); padding: 8px 10px; font-weight: 500; }
.sidebar nav button:hover { color: var(--text); border-color: transparent; background: var(--card); }
.sidebar nav button.active { background: var(--card-2); color: var(--text); border-color: var(--border); }
.usage { margin-top: auto; display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.bar { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--grad); transition: width .3s; }
main.content { padding: 32px 36px 60px; max-width: 1180px; width: 100%; }
.page-head { margin-bottom: 22px; }
.page-head p { margin: 0; color: var(--muted); }
.studio { display: grid; grid-template-columns: 1fr 310px; gap: 16px; align-items: start; }
.editor { display: flex; flex-direction: column; padding: 0; }
.editor textarea { min-height: 360px; resize: vertical; border: none; background: transparent; font-size: 17px; line-height: 1.7; padding: 20px; border-radius: var(--radius) var(--radius) 0 0; }
.editor textarea:focus { outline: none; }
.editor-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding: 12px 16px; }
.player { display: grid; gap: 10px; margin-top: 16px; }
.player audio { width: 100%; height: 40px; }
.voice-card { display: grid; gap: 8px; align-content: start; }
.voice-card .avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--grad); color: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 150px; }
.list-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; }
.list-item + .list-item { margin-top: 8px; }
.list-item audio { width: 100%; height: 36px; margin-top: 10px; }
.block { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.block + .block { margin-top: 8px; }
.block .num { color: var(--faint); font-size: 12px; padding-top: 10px; text-align: center; }
.block textarea { min-height: 70px; resize: vertical; background: transparent; border-color: transparent; padding: 8px; font-size: 16px; line-height: 1.6; }
.block textarea:hover { border-color: var(--border); }
.block .tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.block .tools select { width: auto; max-width: 230px; padding: 6px 8px; font-size: 13px; }
.block audio { height: 32px; max-width: 280px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat .v { font-size: 26px; font-weight: 700; }
.stat .k { color: var(--muted); font-size: 13px; }
.key-box { display: flex; gap: 8px; align-items: center; background: var(--bg-2); border: 1px dashed var(--accent); padding: 10px 12px; border-radius: 10px; word-break: break-all; }
.mobile-bar { display: none; }

@media (max-width: 960px) {
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow); }
  .mobile-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel); position: sticky; top: 0; z-index: 40; }
  main.content { padding: 20px 16px 50px; }
  .studio { grid-template-columns: 1fr; }
  .editor textarea { min-height: 220px; }
}
@media (max-width: 640px) {
  .site-nav .links { display: none; }
  .features, .steps, .pricing { grid-template-columns: 1fr; }
  .demo-body { grid-template-columns: 1fr; }
  .demo-side { border-left: none; border-top: 1px solid var(--border); }
  .hero { padding-top: 60px; }
  .section { padding: 56px 0; }
}
.editor textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; line-height: 1.55; }
.block .tools .b-emotion { max-width: 170px; }

/* Voice previews on the website */
.samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sample { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; cursor: pointer; color: var(--text); font: inherit; }
.sample .play { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 14px; }
.sample.playing { border-color: var(--accent); }
.sample.loading .play { opacity: .6; }

/* Top-up band under pricing */
.topup { margin-top: 16px; }
.topup:empty { display: none; }

/* Notices inside the app */
.notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; margin-bottom: 16px; border-color: var(--accent); }
.notice p { margin: 0; flex: 1; min-width: 220px; }
.invite-hero { display: grid; gap: 14px; }
.invite-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.back-link { display: block; margin: -4px 0 14px; font-size: 13px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--text); }

/* AiResovia brand mark and voice sample cards */
.brand .logo-img { width: 30px; height: 30px; flex: none; display: block; }
.sample { white-space: normal; justify-content: flex-start; align-items: center; min-width: 0; height: 100%; }
.sample > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.brand { white-space: nowrap; }
@media (max-width: 520px) {
  .site-nav .brand { font-size: 15px; gap: 6px; }
  .site-nav .brand .logo-img { width: 24px; height: 24px; }
  .site-nav .btn-ghost { display: none; }
}
