/* =========================================================================
   ViddyWiz design system
   Display: Bricolage Grotesque · Body: Inter · Mono: JetBrains Mono
   Signature gradient: violet → pink → amber
   ========================================================================= */

:root {
  --ink: #090a11;
  --ink-2: #0e0f19;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --solid: #13141f;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f5f6fc;
  --muted: #99a1b5;
  --faint: #6a7080;

  --violet: #7c5cff;
  --pink: #ff4d9d;
  --amber: #ffb020;
  --grad: linear-gradient(120deg, #7c5cff 0%, #ff4d9d 55%, #ffb020 100%);
  --grad-soft: linear-gradient(120deg, rgba(124,92,255,.18), rgba(255,77,157,.14) 55%, rgba(255,176,32,.12));

  --ok: #35d0a5;
  --danger: #ff5470;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --glow: 0 12px 40px rgba(124, 92, 255, .35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--ink);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Decorative background orbs + fine grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(50rem 30rem at 12% -8%, rgba(124, 92, 255, .30), transparent 60%),
    radial-gradient(46rem 30rem at 92% 4%, rgba(255, 77, 157, .22), transparent 58%),
    radial-gradient(40rem 26rem at 70% 100%, rgba(255, 176, 32, .14), transparent 60%),
    var(--ink);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}

a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }

h1, h2, h3, .display {
  font-family: "Bricolage Grotesque", "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  position: relative;
  background: var(--grad);
  background-size: 160% 160%;
  box-shadow: var(--glow);
  transition: transform .08s ease, box-shadow .2s ease, background-position .5s ease, opacity .15s;
}
.btn:hover { background-position: 100% 0; box-shadow: 0 14px 46px rgba(255, 77, 157, .4); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn i { font-size: .95em; }

.btn.ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-2);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line-2); }

.btn.record { background: linear-gradient(120deg, #ff4d6a, #ff2d55); box-shadow: 0 12px 40px rgba(255, 45, 85, .4); }
.btn.record.on { background: var(--surface-2); color: var(--text); border-color: var(--line-2); box-shadow: none; }
.btn.danger { background: linear-gradient(120deg, #ff5470, #e03a58); box-shadow: none; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.block { width: 100%; }

.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255,255,255,.6); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

/* ---------------- Topbar ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 17, .6);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 15px;
  box-shadow: var(--glow);
}
.brand span.name { line-height: 1; }
.topbar nav { display: flex; align-items: center; gap: 10px; }

/* ---------------- Eyebrow / pills ---------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text);
  padding: 7px 14px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid var(--line-2);
  backdrop-filter: blur(8px);
}
.eyebrow i { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- Hero ---------------- */
.hero { max-width: 920px; margin: 0 auto; padding: 64px 24px 26px; text-align: center; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); margin: 22px 0 18px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 600px; margin: 0 auto; }
.hero .trust { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 26px; color: var(--faint); font-size: 13.5px; }
.hero .trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero .trust i { color: var(--violet); }

/* ---------------- Recorder card ---------------- */
.recorder {
  max-width: 900px; margin: 30px auto 54px; padding: 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.preview-wrap {
  position: relative; aspect-ratio: 16/9; border-radius: var(--r-lg); overflow: hidden;
  background: #05060b; border: 1px solid var(--line);
}
.preview-wrap > video#preview { width: 100%; height: 100%; object-fit: contain; background: #05060b; }
.cam-bubble {
  position: absolute; left: 20px; bottom: 20px; width: 122px; height: 122px; border-radius: 50%;
  object-fit: cover; border: 3px solid #fff; background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
.preview-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; text-align: center; padding: 26px; color: var(--muted); font-size: 15px;
}
.preview-placeholder .ph-icon {
  width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center;
  font-size: 26px; color: #fff; background: var(--grad); box-shadow: var(--glow);
}
.countdown { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 6, 11, .62); backdrop-filter: blur(3px); }
.countdown span { font-family: "Bricolage Grotesque"; font-size: 128px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .9s ease; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 40% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }

.options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: stretch; }
.options.locked { opacity: .5; pointer-events: none; }
.opt {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  padding: 10px 14px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .15s, color .15s, background .15s;
}
.opt i { font-size: 14px; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt:has(input:checked) { color: var(--text); border-color: rgba(124, 92, 255, .6); background: var(--grad-soft); }
.opt:has(input:checked) i { color: var(--violet); }
.opt.sel { color: var(--muted); }
.mini-select { background: var(--ink-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 9px; font-family: inherit; font-size: 13px; }

.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.field {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 13px; padding: 12px 15px;
  transition: border-color .15s;
}
.field::placeholder { color: var(--faint); }
.field:focus { outline: none; border-color: rgba(124, 92, 255, .7); box-shadow: 0 0 0 3px rgba(124, 92, 255, .16); }
.grow { flex: 1 1 220px; }
.timer { display: none; align-items: center; gap: 9px; font-weight: 700; font-variant-numeric: tabular-nums; color: #ff5470; font-size: 15px; }
.timer.on { display: inline-flex; }
.timer .dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5470; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.status { margin-top: 14px; min-height: 22px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.status i { color: var(--violet); }
.status.err { color: var(--danger); } .status.err i { color: var(--danger); }
.status.ok { color: var(--ok); } .status.ok i { color: var(--ok); }

.result { display: none; margin-top: 18px; padding: 18px; border-radius: var(--r-lg); background: var(--grad-soft); border: 1px solid var(--line-2); }
.result.show { display: block; animation: rise .35s ease; }
.result strong { display: inline-flex; align-items: center; gap: 9px; }
.result strong i { color: var(--ok); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.link-input { flex: 1 1 240px; font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--text); background: var(--ink); border: 1px solid var(--line); border-radius: 11px; padding: 11px 13px; }
.copied { color: var(--ok); font-size: 13px; margin: 9px 0 0; display: inline-flex; align-items: center; gap: 6px; }

/* ---------------- Features ---------------- */
.section-head { max-width: 1040px; margin: 0 auto; padding: 0 24px; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 14px 0 10px; }
.section-head p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.features { max-width: 1040px; margin: 24px auto 70px; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); gap: 18px; }
.feat {
  padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(10px); transition: transform .18s ease, border-color .18s ease;
}
.feat:hover { transform: translateY(-4px); border-color: var(--line-2); }
.feat .fi { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 20px; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.feat h3 { font-size: 17px; margin: 16px 0 7px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------------- Watch page ---------------- */
.watch-grid { max-width: 1220px; margin: 26px auto 70px; padding: 0 22px; display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }
.player-card { border-radius: var(--r-lg); overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: var(--shadow); }
.player-card video { width: 100%; display: block; }
.watch-head { margin-top: 20px; }
.watch-head h1 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 8px; }
.watch-sub { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.watch-sub .chip { display: inline-flex; align-items: center; gap: 6px; }
.watch-sub .chip i { color: var(--violet); }
.dotsep { opacity: .4; }
.watch-desc { margin: 14px 0 0; color: var(--text); white-space: pre-wrap; }

.reactions { display: flex; gap: 9px; margin: 22px 0 6px; flex-wrap: wrap; }
.reaction { display: inline-flex; align-items: center; gap: 7px; font-size: 17px; color: var(--text); cursor: pointer; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); transition: transform .08s, border-color .15s, background .15s; }
.reaction:hover { border-color: rgba(124,92,255,.6); background: var(--grad-soft); }
.reaction:active { transform: scale(.93); }
.reaction .rc { font-size: 13px; color: var(--muted); font-family: "JetBrains Mono", monospace; min-width: 6px; }

.comments { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.comments h3 { font-size: 18px; margin: 0 0 16px; display: flex; align-items: center; gap: 9px; }
.comments h3 i { color: var(--violet); }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.comment-form .btn { align-self: flex-start; }
.comment-list { display: flex; flex-direction: column; gap: 18px; }
.comment { display: flex; gap: 13px; }
.cavatar { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad); }
.cmeta { font-size: 14px; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.cstamp { display: inline-flex; align-items: center; gap: 5px; background: var(--surface); border: 1px solid var(--line); color: var(--violet); border-radius: 999px; padding: 2px 9px; font-size: 12px; cursor: pointer; font-family: "JetBrains Mono", monospace; }
.ctext { font-size: 14px; color: var(--text); }

.watch-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 86px; }
.side-card { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.side-card h3 { font-size: 14px; margin: 0 0 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.side-card h3 i { color: var(--violet); }
.side-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.embed-box { margin-top: 10px; font-family: "JetBrains Mono", monospace; font-size: 12px; height: 82px; resize: none; }
.transcript { max-height: 440px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.transcript::-webkit-scrollbar { width: 8px; } .transcript::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.tcue { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13px; transition: background .12s; }
.tcue:hover { background: var(--surface-2); }
.tcue .ts { color: var(--violet); font-family: "JetBrains Mono", monospace; flex: 0 0 auto; }

/* ---------------- Library ---------------- */
.lib-wrap { max-width: 1180px; margin: 30px auto 70px; padding: 0 22px; }
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.lib-head h1 { font-size: clamp(26px, 3.4vw, 34px); margin: 0; }
.search-wrap { position: relative; }
.search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; }
.search { max-width: 300px; padding-left: 38px; border-radius: 999px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .16s, border-color .16s; backdrop-filter: blur(8px); }
.card:hover { transform: translateY(-4px); border-color: rgba(124, 92, 255, .5); }
.thumb-link { position: relative; display: block; aspect-ratio: 16/9; background: #05060b; }
.thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.dur { position: absolute; right: 9px; bottom: 9px; padding: 3px 8px; border-radius: 7px; font-size: 12px; font-family: "JetBrains Mono", monospace; background: rgba(0, 0, 0, .82); color: #fff; }
.playover { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .16s; }
.playover span { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 20px; box-shadow: var(--glow); }
.thumb-link:hover .playover { opacity: 1; }
.card .body { padding: 15px 16px 8px; }
.card .body h3 { font-size: 15.5px; margin: 0 0 5px; line-height: 1.3; }
.card .body .sub { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card .body .sub i { color: var(--faint); }
.card .actions { display: flex; gap: 8px; padding: 8px 16px 16px; }
.empty { text-align: center; color: var(--muted); padding: 80px 0; }
.empty i { font-size: 34px; color: var(--faint); display: block; margin-bottom: 14px; }
.empty a { color: var(--violet); font-weight: 600; }

.footnote { text-align: center; color: var(--faint); font-size: 13px; padding: 26px; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Plyr theme */
:root { --plyr-color-main: #7c5cff; --plyr-video-control-color: #fff; }

@media (max-width: 900px) {
  .watch-grid { grid-template-columns: 1fr; }
  .watch-side { position: static; }
}

/* =========================================================================
   Dashboard shell
   ========================================================================= */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px; flex: 0 0 252px; height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; gap: 22px; padding: 20px 16px;
  border-right: 1px solid var(--line); background: rgba(9, 10, 17, .5); backdrop-filter: blur(16px);
}
.sidebar .brand { padding: 4px 6px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: 14.5px; border: 1px solid transparent; transition: .15s; }
.nav-item i { width: 20px; text-align: center; font-size: 15px; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--grad-soft); color: var(--text); border-color: var(--line-2); }
.nav-item.active i { color: var(--violet); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.storage-meter { font-size: 12.5px; color: var(--muted); }
.sm-top { display: flex; justify-content: space-between; margin-bottom: 7px; }
.sm-top i { color: var(--violet); }
.sm-bar { height: 7px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.sm-bar span { display: block; height: 100%; background: var(--grad); transition: width .4s ease; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 26px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: rgba(9, 10, 17, .6); backdrop-filter: blur(14px); }
.page-title { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.token-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.token-badge i { color: var(--amber); }
.token-badge.ok { color: var(--ok); border-color: rgba(53, 208, 165, .4); } .token-badge.ok i { color: var(--ok); }

.views { padding: 26px; }
.view { display: none; }
.view.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.welcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.welcome h1 { font-size: 30px; margin: 0 0 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.stat .si { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; color: #fff; background: var(--grad); box-shadow: var(--glow); }
.stat .sv { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 24px; line-height: 1; }
.stat .sl { color: var(--muted); font-size: 13px; margin-top: 4px; }

.panel { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h3 { font-size: 15px; margin: 0; display: flex; align-items: center; gap: 9px; }
.panel-head h3 i { color: var(--violet); }
.link { color: var(--violet); font-size: 13px; font-weight: 600; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.mini-list { display: flex; flex-direction: column; gap: 6px; }
.mini-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; transition: .12s; }
.mini-item:hover { background: var(--surface-2); }
.mini-thumb { flex: 0 0 56px; width: 56px; height: 34px; border-radius: 8px; object-fit: cover; background: #05060b; }
.mini-body { flex: 1; min-width: 0; }
.mini-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 12px; color: var(--muted); } .mini-sub i { color: var(--faint); }
.mini-arrow { color: var(--faint); font-size: 12px; }
.mini-empty { color: var(--faint); font-size: 13px; padding: 16px 8px; }

.record-layout { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.record-layout .recorder { margin: 0; }
.tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.tips li { display: flex; gap: 11px; font-size: 13.5px; color: var(--muted); }
.tips li i { color: var(--violet); margin-top: 2px; }
.tips a { color: var(--violet); }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.toggle-group { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tg { background: var(--surface); border: none; color: var(--muted); padding: 8px 12px; cursor: pointer; }
.tg.on { background: var(--grad-soft); color: var(--violet); }

.list { display: flex; flex-direction: column; gap: 10px; }
.lrow { display: grid; grid-template-columns: 120px 1fr auto auto auto auto; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.lrow:hover { border-color: var(--line-2); }
.lthumb { position: relative; width: 120px; height: 68px; border-radius: 10px; overflow: hidden; background: #05060b; display: block; }
.lthumb img { width: 100%; height: 100%; object-fit: cover; }
.lmain { min-width: 0; } .ltitle { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lsub { font-size: 12.5px; color: var(--muted); }
.lstat { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; } .lstat i { color: var(--faint); }
.lactions { display: flex; gap: 6px; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-wrap { height: 262px; position: relative; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; } .kv span { color: var(--muted); } .kv b { font-family: "JetBrains Mono", monospace; font-size: 13px; text-align: right; word-break: break-all; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: none; } .set-row span { display: flex; align-items: center; gap: 9px; font-size: 14px; } .set-row span i { color: var(--violet); }

.switch { position: relative; width: 44px; height: 24px; flex: 0 0 44px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 2px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--grad); border-color: transparent; }
.switch input:checked + span::before { transform: translateX(20px); }

.modal { position: fixed; inset: 0; background: rgba(4, 5, 10, .62); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { width: 100%; max-width: 520px; background: var(--solid); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-head h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 9px; } .modal-head h3 i { color: var(--violet); }
.icon-btn { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.lbl { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; text-transform: uppercase; letter-spacing: .03em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: auto; flex: none; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .side-foot { margin: 0; flex-direction: row; align-items: center; gap: 12px; }
  .storage-meter { display: none; }
  .two-col, .chart-grid, .settings-grid, .record-layout { grid-template-columns: 1fr; }
}

/* =========================================================================
   Landing page
   ========================================================================= */
.btn.lg { padding: 14px 26px; font-size: 15.5px; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

.compare { max-width: 940px; margin: 6px auto 40px; padding: 0 24px; }
.ctable { display: grid; grid-template-columns: 1.3fr 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); backdrop-filter: blur(8px); }
.ccol { display: flex; flex-direction: column; }
.ccol.us { background: var(--grad-soft); }
.crow { padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 14px; min-height: 54px; display: flex; align-items: center; }
.ccol:not(:last-child) .crow { border-right: 1px solid var(--line); }
.crow.rlabel { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 15px; gap: 9px; background: rgba(255,255,255,.03); }
.ccol.head .crow { color: var(--muted); font-weight: 500; }
.ccol.head .crow.rlabel { background: transparent; }
.crow .yes { color: var(--ok); } .crow .no { color: var(--danger); }
.logo.sm { width: 24px; height: 24px; border-radius: 8px; font-size: 11px; }
.save-callout { text-align: center; font-size: 17px; margin: 26px auto 0; max-width: 640px; }
.save-callout b { color: var(--text); }

.final-cta { text-align: center; padding: 60px 24px; }
.final-cta h2 { font-size: clamp(26px, 3.6vw, 38px); margin: 0 0 10px; }
.final-cta .btn { margin-top: 22px; }
.foot { max-width: 1100px; margin: 0 auto; padding: 26px 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.foot .logo.sm { display: inline-grid; place-items: center; vertical-align: middle; margin-right: 6px; }

/* =========================================================================
   Auth pages
   ========================================================================= */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; padding: 34px 30px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(16px); text-align: center; }
.brand.center { justify-content: center; margin-bottom: 20px; }
.auth-card h1 { font-size: 26px; margin: 0 0 6px; }
.auth-card > .muted { margin: 0 0 22px; }
.auth-form { display: flex; flex-direction: column; text-align: left; }
.auth-form .lbl { margin: 14px 0 6px; }
.auth-form .btn { margin-top: 20px; justify-content: center; }
.auth-msg { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(255,84,112,.12); border: 1px solid rgba(255,84,112,.4); color: #ff8ea0; font-size: 13.5px; text-align: center; }
.auth-alt { margin: 20px 0 0; font-size: 14px; color: var(--muted); }
.auth-alt a { color: var(--violet); font-weight: 600; }

/* =========================================================================
   Account + storage connect (dashboard)
   ========================================================================= */
.acct-name { font-size: 13.5px; color: var(--muted); font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storage-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.storage-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.so-name { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 15px; }
.so-name i { font-size: 20px; color: var(--violet); width: 24px; text-align: center; }
.so-right { display: flex; align-items: center; gap: 10px; }
.pill-ok { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ok); }

@media (max-width: 620px) {
  .ctable { grid-template-columns: 1fr; }
  .ccol.head { display: none; }
  .ccol .crow.rlabel { justify-content: center; }
}
