:root {
  /* Surfaces */
  --bg: #f6f8fc;
  --bg-soft: #eef2fb;
  --card: #ffffff;
  --card-border: #e2e7f0;
  /* Ink */
  --text: #10131c;
  --text-dim: #62687a;
  /* Blue system (token names kept so every gradient in the site re-colours automatically) */
  --accent-a: #2f6feb;   /* primary blue */
  --accent-b: #5b8def;   /* light blue - highlight */
  --accent-c: #1d4fc4;   /* deep blue - depth */
  --navy: #111116;
  --ink: #0b1433;        /* code / terminal surfaces */
  --ink-bar: #121f4a;
  --sky: #dbe6ff;
  --green: #12a150;
  --red: #e5484d;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(20,35,90,.05), 0 14px 34px -18px rgba(30,55,140,.22);
  --shadow-lg: 0 24px 60px -24px rgba(30,55,140,.38);
  --font-body: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-head: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-serif: 'Manrope', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; }
h1, h2 { font-weight: 600; letter-spacing: -0.03em; }

a { color: inherit; text-decoration: none; }
code { font-family: 'Menlo', 'Consolas', monospace; }

/* ---------- Background blobs ---------- */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  /* was: filter: blur(120px) + infinite animation = the browser repainted a huge blur every frame.
     The radial-gradient already fades to transparent, so it looks the same without the filter. */
  opacity: 0.45;
  z-index: -1;
  pointer-events: none;
  contain: strict;
}
.blob-1 {
  width: 720px; height: 720px;
  top: -300px; left: -260px;
  background: radial-gradient(circle, #a8c3f7, transparent 70%);
}
.blob-2 {
  width: 760px; height: 760px;
  bottom: -340px; right: -300px;
  background: radial-gradient(circle, #cfe0ff, transparent 70%);
}
.bg-blob { opacity: 0.35; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
}

/* ---------- Navbar (floating white pill) ---------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  padding: 12px 16px 0;
}
/* Blur + tint live on a pseudo-element. backdrop-filter directly on .navbar / .nav-inner makes it
   the containing block for the fixed mobile menu, which breaks the menu's position. */
.navbar::before { content: none; }
.nav-inner {
  position: relative; isolation: isolate;
  max-width: 1240px; margin: 0 auto; padding: 10px 12px 10px 18px; min-height: 60px; gap: 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 1px 2px rgba(20,35,90,.06), 0 16px 40px -18px rgba(30,55,140,.35);
}
.nav-inner::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.88);
}
.brand {
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  display: flex; align-items: center; gap: 8px;
}
.brand { flex-shrink: 0; }
.brand-mark { font-size: 1.3rem; }
.brand-mark.big { font-size: 2.6rem; display: block; margin-bottom: 8px; }

/* ---------- Logo lockup ---------- */
.logo-badge {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -4px rgba(47,111,235,0.65);
  position: relative; overflow: hidden;
}
.logo-badge::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: badgeShine 4s ease-in-out infinite;
}
@keyframes badgeShine { 0%,60%,100% { transform: translateX(-120%); } 80% { transform: translateX(120%); } }
.logo-badge.lg { width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 14px; }
.logo-badge svg { position: relative; z-index: 1; }

/* ---------- Live prism equalizer logo ---------- */
.logo-badge.eq-badge {
  background: #fff;
  box-shadow: 0 6px 16px -6px rgba(47,111,235,0.45), 0 0 0 1px rgba(17,17,22,0.08) inset;
}
.logo-badge.eq-badge::after { display: none; }
.prism-eq { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; gap: 7%; width: 60%; height: 52%; }
.prism-eq i {
  display: block; flex: 1; height: 100%; border-radius: 99px; transform-origin: bottom; transform: scaleY(.5);
  background: linear-gradient(to top, #d81b60, #e67e00 22%, #c9a400 40%, #0f9d63 58%, #1976d2 78%, #7b3fe4);
  will-change: transform; backface-visibility: hidden;
  animation-duration: 2.8s; animation-timing-function: linear; animation-iteration-count: infinite;
}
.prism-eq i:nth-child(1) { animation-name: eqBar1; }
.prism-eq i:nth-child(2) { animation-name: eqBar2; }
.prism-eq i:nth-child(3) { animation-name: eqBar3; }
.prism-eq i:nth-child(4) { animation-name: eqBar4; }
@keyframes eqBar1 { 0.00%{transform:scaleY(0.610)} 3.57%{transform:scaleY(0.698)} 7.14%{transform:scaleY(0.779)} 10.71%{transform:scaleY(0.845)} 14.29%{transform:scaleY(0.892)} 17.86%{transform:scaleY(0.917)} 21.43%{transform:scaleY(0.920)} 25.00%{transform:scaleY(0.904)} 28.57%{transform:scaleY(0.874)} 32.14%{transform:scaleY(0.834)} 35.71%{transform:scaleY(0.789)} 39.29%{transform:scaleY(0.742)} 42.86%{transform:scaleY(0.696)} 46.43%{transform:scaleY(0.653)} 50.00%{transform:scaleY(0.610)} 53.57%{transform:scaleY(0.567)} 57.14%{transform:scaleY(0.524)} 60.71%{transform:scaleY(0.478)} 64.29%{transform:scaleY(0.431)} 67.86%{transform:scaleY(0.386)} 71.43%{transform:scaleY(0.346)} 75.00%{transform:scaleY(0.316)} 78.57%{transform:scaleY(0.300)} 82.14%{transform:scaleY(0.303)} 85.71%{transform:scaleY(0.328)} 89.29%{transform:scaleY(0.375)} 92.86%{transform:scaleY(0.441)} 96.43%{transform:scaleY(0.522)} 100.00%{transform:scaleY(0.610)} }
@keyframes eqBar2 { 0.00%{transform:scaleY(0.940)} 3.57%{transform:scaleY(0.882)} 7.14%{transform:scaleY(0.815)} 10.71%{transform:scaleY(0.744)} 14.29%{transform:scaleY(0.674)} 17.86%{transform:scaleY(0.608)} 21.43%{transform:scaleY(0.548)} 25.00%{transform:scaleY(0.493)} 28.57%{transform:scaleY(0.443)} 32.14%{transform:scaleY(0.397)} 35.71%{transform:scaleY(0.355)} 39.29%{transform:scaleY(0.318)} 42.86%{transform:scaleY(0.287)} 46.43%{transform:scaleY(0.266)} 50.00%{transform:scaleY(0.260)} 53.57%{transform:scaleY(0.272)} 57.14%{transform:scaleY(0.304)} 60.71%{transform:scaleY(0.358)} 64.29%{transform:scaleY(0.432)} 67.86%{transform:scaleY(0.523)} 71.43%{transform:scaleY(0.623)} 75.00%{transform:scaleY(0.725)} 78.57%{transform:scaleY(0.821)} 82.14%{transform:scaleY(0.901)} 85.71%{transform:scaleY(0.960)} 89.29%{transform:scaleY(0.994)} 92.86%{transform:scaleY(1.000)} 96.43%{transform:scaleY(0.981)} 100.00%{transform:scaleY(0.940)} }
@keyframes eqBar3 { 0.00%{transform:scaleY(0.432)} 3.57%{transform:scaleY(0.408)} 7.14%{transform:scaleY(0.390)} 10.71%{transform:scaleY(0.374)} 14.29%{transform:scaleY(0.360)} 17.86%{transform:scaleY(0.349)} 21.43%{transform:scaleY(0.342)} 25.00%{transform:scaleY(0.340)} 28.57%{transform:scaleY(0.348)} 32.14%{transform:scaleY(0.367)} 35.71%{transform:scaleY(0.400)} 39.29%{transform:scaleY(0.446)} 42.86%{transform:scaleY(0.504)} 46.43%{transform:scaleY(0.571)} 50.00%{transform:scaleY(0.640)} 53.57%{transform:scaleY(0.705)} 57.14%{transform:scaleY(0.760)} 60.71%{transform:scaleY(0.800)} 64.29%{transform:scaleY(0.820)} 67.86%{transform:scaleY(0.819)} 71.43%{transform:scaleY(0.799)} 75.00%{transform:scaleY(0.762)} 78.57%{transform:scaleY(0.712)} 82.14%{transform:scaleY(0.657)} 85.71%{transform:scaleY(0.600)} 89.29%{transform:scaleY(0.546)} 92.86%{transform:scaleY(0.500)} 96.43%{transform:scaleY(0.462)} 100.00%{transform:scaleY(0.432)} }
@keyframes eqBar4 { 0.00%{transform:scaleY(0.312)} 3.57%{transform:scaleY(0.332)} 7.14%{transform:scaleY(0.363)} 10.71%{transform:scaleY(0.407)} 14.29%{transform:scaleY(0.463)} 17.86%{transform:scaleY(0.531)} 21.43%{transform:scaleY(0.607)} 25.00%{transform:scaleY(0.688)} 28.57%{transform:scaleY(0.768)} 32.14%{transform:scaleY(0.842)} 35.71%{transform:scaleY(0.901)} 39.29%{transform:scaleY(0.942)} 42.86%{transform:scaleY(0.960)} 46.43%{transform:scaleY(0.954)} 50.00%{transform:scaleY(0.924)} 53.57%{transform:scaleY(0.873)} 57.14%{transform:scaleY(0.806)} 60.71%{transform:scaleY(0.730)} 64.29%{transform:scaleY(0.649)} 67.86%{transform:scaleY(0.571)} 71.43%{transform:scaleY(0.500)} 75.00%{transform:scaleY(0.438)} 78.57%{transform:scaleY(0.389)} 82.14%{transform:scaleY(0.351)} 85.71%{transform:scaleY(0.324)} 89.29%{transform:scaleY(0.307)} 92.86%{transform:scaleY(0.300)} 96.43%{transform:scaleY(0.301)} 100.00%{transform:scaleY(0.312)} }
@media (prefers-reduced-motion: reduce) { .prism-eq i { animation: none; transform: scaleY(.7); } .prism-eq i:nth-child(2){transform:scaleY(1)} .prism-eq i:nth-child(4){transform:scaleY(.5)} }

.brand-name {
  font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--navy) 0%, var(--accent-a) 30%, var(--accent-b) 55%, var(--accent-a) 78%, var(--navy) 100%);
  background-size: 280% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brandShine 5s linear infinite;
  filter: drop-shadow(0 2px 10px rgba(47,111,235,0.22));
  display: inline-block;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.brand:hover .brand-name, .footer-brand-row:hover .brand-name {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 16px rgba(47,111,235,0.4));
}
.brand-name.lg { font-size: 2rem; }
.footer-brand-name { font-size: 1.7rem; }
@keyframes brandShine { to { background-position: -280% center; } }

.icon-svg { display: inline-flex; align-items: center; justify-content: center; }

.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-links-scroll { display: flex; align-items: center; gap: 2px; }
.nav-links-account { display: flex; align-items: center; gap: 14px; }

.nav-links-scroll a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-dim); font-weight: 600; font-size: 0.85rem; white-space: nowrap;
  padding: 8px 10px; border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-links-scroll a .i { opacity: 0.75; transition: opacity 0.2s ease; }
.nav-links-scroll a:hover { color: var(--text); background: rgba(47,111,235,0.07); }
.nav-links-scroll a:hover .i { opacity: 1; }
.nav-links-scroll a.active {
  color: var(--accent-a); font-weight: 700;
  background: #eef2fb;
  box-shadow: inset 0 0 0 1px rgba(47,111,235,0.18);
}
.nav-links-scroll a.active .i { opacity: 1; color: var(--accent-a); }

.nav-avatar { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; }
.nav-avatar img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--accent-a); }

.nav-wallet {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: #eef2fb; border: 1px solid #c9d8f7;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.nav-wallet:hover { background: #dce8fd; border-color: var(--accent-b); transform: translateY(-1px); }
.nav-wallet.active { background: #dce8fd; border-color: var(--accent-a); }
.nav-wallet svg, .nav-wallet .icon-svg { color: var(--accent-a); flex-shrink: 0; }
.nav-wallet-label { color: var(--accent-a); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.03em; }
.nav-wallet-amt { font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; color: var(--text); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 38px; height: 38px; background: #f6f8fc; border: 1px solid var(--card-border);
  border-radius: 12px; cursor: pointer; position: relative;
}
.nav-toggle span {
  width: 18px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-weight: 700; font-size: 0.93rem; cursor: pointer; font-family: inherit;
  border: none; transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(180deg, #4a7ff2 0%, var(--accent-a) 100%);
  color: white;
  box-shadow: 0 10px 24px -10px rgba(47,111,235, 0.75), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { box-shadow: 0 14px 30px -8px rgba(47,111,235, 0.8), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--card-border); box-shadow: 0 6px 16px -10px rgba(30,55,140,.3); }
.btn-ghost:hover { background: #f6f8fc; }
.btn-danger-ghost { background: #fff1f1; color: #c0342f; border: 1px solid rgba(229,72,77,0.3); }
.btn-danger-ghost:hover { background: #ffe4e4; }
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  max-width: 900px; margin: 0 auto; padding: 90px 24px 60px;
  text-align: center;
}
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: rgba(255,255,255,0.9); border: 1px solid #c9d8f7; box-shadow: 0 6px 16px -10px rgba(30,55,140,.35);
  color: var(--accent-a); font-size: 0.85rem; font-weight: 700; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); line-height: 1.1; margin-bottom: 20px; color: var(--navy); }
/* Accent word: italic serif in YouTube red */
.gradient-text {
  font-family: var(--font-head); font-style: normal; font-weight: 800; letter-spacing: -0.02em;
  color: var(--accent-a);
}
.hero-sub { color: var(--text-dim); font-size: 1.1rem; max-width: 620px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.tok-comment { color: #7f8fbd; }
.tok-key { color: #8fc0ff; font-weight: 700; }
.tok-string { color: #8ff0b4; }

/* ---------- Fade-up animation ---------- */
.fade-up { opacity: 0; transform: translateY(18px); animation: fadeUp 0.7s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ---------- Features ---------- */
.section-title { text-align: center; font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 30px 0 40px; color: var(--navy); }
.features, .pricing, .bot-promo, .docs, .dash, .settings, .help, .legal, .contact { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover { transform: translateY(-6px); border-color: #b7c9f2; box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Bot promo ---------- */
:root {
  --tg-blue-a: #2aabee;
  --tg-blue-b: #229ed9;
}
.bot-promo-inner {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #e8f0fe 60%, #dce8fd 100%);
  border: 1px solid var(--card-border); border-radius: 32px; padding: 44px;
  box-shadow: var(--shadow);
}
.bot-promo-inner::before {
  content: ""; position: absolute; top: -80px; right: -80px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,90,77,0.35), transparent 70%);
  pointer-events: none;
}
.pill { display: inline-flex; align-items: center; gap: 6px; background: #e3ebfd; color: var(--accent-a); padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; margin-bottom: 14px; }
.pill-tg { background: rgba(42,171,238,0.14); color: #0e7bb8; }
.tg-pill-icon { width: 14px; height: 14px; flex-shrink: 0; }
.bot-promo-text h2 { font-size: 1.8rem; margin-bottom: 14px; color: var(--navy); }
.tg-gradient-text {
  font-family: var(--font-head); font-style: normal; font-weight: 800; letter-spacing: -0.02em;
  color: var(--tg-blue-a);
}
.bot-promo-text p { color: var(--text-dim); margin-bottom: 22px; }
.bot-promo-text code { background: rgba(47,111,235,0.08); padding: 2px 6px; border-radius: 6px; }
.btn-tg { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--tg-blue-a), var(--tg-blue-b)); border: none; }
.btn-tg-icon { width: 18px; height: 18px; flex-shrink: 0; }

@keyframes pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }
.dash-promo { margin-top: 40px; }

/* ---------- Auth screen ---------- */
.auth-screen { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 32px;
  padding: 48px 40px; max-width: 420px; width: 100%; text-align: center;
  box-shadow: var(--shadow-lg);
}
.auth-orb {
  position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-b), transparent 70%);
  filter: blur(60px); opacity: 0.6;   /* static: no infinite animation on a blurred layer */
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.75; } }
.auth-card h1 { font-size: 1.6rem; margin: 8px 0 10px; }
.auth-card p { color: var(--text-dim); margin-bottom: 28px; font-size: 0.95rem; }
.auth-note { margin-top: 20px; font-size: 0.82rem; }
.auth-note a { color: var(--accent-a); text-decoration: underline; }
/* Yellow highlight for the "check your Spam folder" hint on the OTP page */
.auth-card .auth-note.spam-hint {
  display: block;
  background: #ffe600;
  color: #111;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 4px;
  margin-bottom: 14px;
}
.auth-card .auth-note.spam-hint strong { color: #111; }

.google-btn {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 14px; border-radius: 14px;
  background: white; color: #1f1f1f; font-weight: 600; font-size: 0.98rem;
  border: 1px solid #dfe4ee;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 26px -14px rgba(47,111,235,0.45);
}
.google-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(47,111,235,0.5); }
.google-btn-shine {
  position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(47,111,235,0.10), transparent);
  animation: shine 2.6s ease-in-out infinite;
}
@keyframes shine { 0% { left: -60%; } 100% { left: 130%; } }

/* ---------- Locked dashboard preview (shown to signed-out visitors) ---------- */
.locked-preview { max-width: 800px; margin: 0 auto; padding: 10px 24px 70px; text-align: center; }
.locked-preview-label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 20px;
  color: var(--accent-a); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.02em;
}
.locked-card { position: relative; overflow: hidden; opacity: 0.9; }
.locked-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 40%, rgba(243,247,255,0.75) 100%);
  pointer-events: none;
}
.blur-value { filter: blur(5px); -webkit-user-select: none; user-select: none; transition: filter 0.3s ease; }
.locked-card:hover .blur-value { filter: blur(3px); }
.locked-preview-note { color: var(--text-dim); font-size: 0.9rem; margin-top: 22px; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ---------- Dashboard ---------- */
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.dash-header h1 { font-size: 1.9rem; margin-bottom: 4px; color: var(--navy); }
.dash-header p { color: var(--text-dim); }
.dash-avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--accent-a); }

.stats { margin-bottom: 30px; }
.stat-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.stat-label { color: var(--text-dim); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 1.6rem; font-weight: 700; font-family: var(--font-head); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.badge-green { background: rgba(18,161,80,0.12); color: #0f8a44; }
.badge-red { background: rgba(229,72,77,0.12); color: #c0342f; }
.badge-gray { background: #eef1f5; color: var(--text-dim); }

.key-panel { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 30px; margin-bottom: 30px; box-shadow: var(--shadow); }
.key-panel h2 { margin-bottom: 6px; }
.key-panel > p { color: var(--text-dim); margin-bottom: 18px; font-size: 0.92rem; }
.key-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg-soft); border: 1px dashed #b7c9f2; border-radius: 14px;
  padding: 14px 18px; margin-bottom: 18px; max-width: 100%;
}
.key-box code { color: var(--accent-a); font-size: 0.95rem; font-weight: 600; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; word-break: break-all; white-space: normal; }
.key-box button { flex-shrink: 0; }
@media (max-width: 480px) {
  .key-box { flex-wrap: wrap; }
}
.key-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.key-warning { margin-top: 14px; font-size: 0.82rem; color: var(--text-dim); }

/* ---------- Usage overview (dashboard charts) ---------- */
.usage-panel { margin-bottom: 30px; }
.dash-plans { margin-bottom: 30px; }
.usage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.usage-head h2 { font-size: 1.4rem; }
.usage-head p { color: var(--text-dim); font-size: .88rem; margin-top: 2px; }
.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.u-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; min-width: 0; box-shadow: var(--shadow); }
.u-card h3 { font-size: .96rem; margin-bottom: 14px; }
.u-wide { grid-column: 1 / -1; }
.u-card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.u-total { font: 800 2.2rem var(--font-head); letter-spacing: -.02em; }
.u-total-label { color: var(--text-dim); font-size: .85rem; margin-left: 10px; }

/* 7-day trend bars */
.eq-chart { display: flex; align-items: flex-end; gap: 10px; height: 112px; padding-top: 14px; }
.eq-bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; }
.eq-bar { width: 100%; max-width: 28px; min-height: 2px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--accent-b), var(--accent-a)); transition: height .6s cubic-bezier(.22,1,.36,1); }
.eq-bar-day { font-size: .72rem; color: var(--text-dim); }

/* Audio vs video donut */
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; padding-top: 4px; }
.donut-ring {
  --audio-deg: 0deg; width: 104px; height: 104px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--accent-b) 0deg var(--audio-deg), var(--accent-c) var(--audio-deg) 360deg);
  display: flex; align-items: center; justify-content: center; transition: background .3s ease;
}
.donut-hole { width: 66px; height: 66px; border-radius: 50%; background: var(--card); }
.donut-legend { display: flex; flex-direction: column; gap: 10px; font-size: .88rem; }
.legend-row { display: flex; align-items: center; gap: 8px; color: var(--text-dim); }
.legend-row b { color: var(--text); margin-left: auto; padding-left: 16px; font-family: var(--font-head); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-audio { background: var(--accent-b); }
.dot-video { background: var(--accent-c); }

/* Shared lists: top downloads + recent activity */
.song-list, .activity-list { list-style: none; display: flex; flex-direction: column; }
.song-list li, .activity-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--card-border); font-size: .87rem; }
.song-list li:last-child, .activity-list li:last-child { border-bottom: none; }
.song-rank { width: 20px; height: 20px; border-radius: 50%; background: #e3ebfd; color: var(--accent-a); font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.song-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-count { color: var(--text-dim); font-size: .8rem; flex-shrink: 0; }
.activity-list li { justify-content: space-between; }
.activity-list li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-meta { color: var(--text-dim); font-size: .76rem; flex-shrink: 0; margin-left: 10px; }
.kind-tag { font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-left: 8px; }
.kind-audio { background: rgba(255,90,77,.16); color: #2f6feb; }
.kind-video { background: rgba(20,40,110,.10); color: #1d4fc4; }
.empty-state { color: var(--text-dim); font-size: .86rem; text-align: center; padding: 20px 0; }

@media (max-width: 900px) {
  .usage-grid { grid-template-columns: 1fr; }
  .u-wide { grid-column: 1; }
}

/* ---------- Docs ---------- */
.doc-copy-box { margin-bottom: 0; }
.docs h1 { font-size: 2.2rem; margin-bottom: 10px; color: var(--navy); }
.docs > p { color: var(--text-dim); margin-bottom: 36px; }
.doc-block { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px; margin-bottom: 22px; box-shadow: var(--shadow); }
.doc-block h2 { font-size: 1.25rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.doc-block p { color: var(--text-dim); margin-bottom: 14px; }
.doc-block pre { background: var(--ink); color: #dbe6ff; border-radius: 14px; padding: 16px; overflow-x: auto; margin-bottom: 14px; font-size: 0.86rem; }
.doc-locked { background: var(--card); border: 1px dashed #b7c9f2; border-radius: var(--radius); padding: 44px 26px; text-align: center; }
.doc-locked-icon { font-size: 2rem; margin-bottom: 10px; }
.doc-locked h2 { font-size: 1.25rem; margin-bottom: 8px; }
.doc-locked p { color: var(--text-dim); max-width: 460px; margin: 0 auto 22px; }
.method-tag { background: rgba(18,161,80,0.14); color: #0f8a44; padding: 2px 10px; border-radius: 6px; font-size: 0.8rem; font-family: monospace; }
.param-table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 16px; }
.param-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.param-table th, .param-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--card-border); overflow-wrap: anywhere; }
.param-table th { color: var(--text-dim); font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .param-table { min-width: 480px; }
}

/* ---------- Settings ---------- */
.settings h1 { font-size: 2rem; margin-bottom: 24px; color: var(--navy); }
.settings-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px; margin-bottom: 18px; box-shadow: var(--shadow); }
.settings-card h2 { font-size: 1.1rem; margin-bottom: 8px; }
.settings-card p { color: var(--text-dim); margin-bottom: 14px; font-size: 0.92rem; }
.settings-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--card-border); }
.settings-row:last-child { border-bottom: none; }
.settings-label { color: var(--text-dim); }

/* ---------- Help / FAQ ---------- */
.help h1 { font-size: 2rem; margin-bottom: 24px; color: var(--navy); }
.faq-item { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 14px; box-shadow: var(--shadow); }
.faq-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.faq-item p { color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Legal ---------- */
.legal h1 { font-size: 2.1rem; margin: 14px 0 14px; color: var(--navy); }
.legal-intro { color: var(--text-dim); max-width: 700px; margin-bottom: 36px; font-size: 1rem; }
.legal-block {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius);
  padding: 24px 26px; margin-bottom: 18px; box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.legal-block:hover { transform: translateY(-4px); border-color: #b7c9f2; box-shadow: 0 20px 44px -20px rgba(47,111,235,0.4); }
.legal-block h2 { font-size: 1.12rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.legal-icon { font-size: 1.2rem; line-height: 1; }
.legal-block p { color: var(--text-dim); margin-bottom: 10px; }
.legal-block p:last-child { margin-bottom: 0; }
.legal-block strong { color: var(--text); }
.legal-block a { color: var(--accent-a); text-decoration: underline; text-underline-offset: 3px; }

/* Privacy / Terms: long legal text set in small type so it stays compact and easy to scan */
.legal-small h1 { font-size: 1.7rem; }
.legal-small .legal-intro { font-size: .84rem; line-height: 1.65; margin-bottom: 24px; }
.legal-small .legal-updated { color: var(--text-dim); font-size: .74rem; margin: -14px 0 22px; }
.legal-small .legal-block { padding: 16px 20px; margin-bottom: 12px; }
.legal-small .legal-block:hover { transform: none; box-shadow: var(--shadow); }
.legal-small .legal-block h2 { font-size: .95rem; margin-bottom: 8px; }
.legal-small .legal-block p, .legal-small .legal-block li { font-size: .8rem; line-height: 1.7; }
.legal-small .legal-block p { margin-bottom: 8px; }
.legal-small .legal-block ul { margin: 0 0 8px 18px; padding: 0; color: var(--text-dim); list-style: disc; }
.legal-small .legal-block li { margin-bottom: 3px; }


/* Privacy Policy: plain document style, no frames/cards (VidsSave-like) */
.legal-plain { max-width: 820px; background: none; border: 0; box-shadow: none; font-family: Roboto, Arial, "Helvetica Neue", system-ui, sans-serif; color: #000; }
.legal-plain .legal-crumb { font-size: .7rem; color: #2f4a8a; margin-bottom: 18px; }
.legal-plain .legal-crumb a { color: #2f4a8a; text-decoration: none; }
.legal-plain .legal-crumb span { color: #2f4a8a; }
.legal-plain h1 { font-family: inherit; font-size: .9rem; font-weight: 700; letter-spacing: 0; color: #000; margin: 0 0 10px; }
.legal-plain .legal-intro, .legal-plain .legal-updated { color: #000; max-width: none; font-size: .7rem; line-height: 1.55; }
.legal-plain .legal-updated { margin: 0 0 18px; }
.legal-plain h2 { margin-top: 14px !important; font-family: inherit; font-size: .7rem; font-weight: 700; letter-spacing: 0; color: #000; display: block; margin: 0 0 3px; }
.legal-plain p, .legal-plain li { color: #000; font-size: .7rem; line-height: 1.55; }
.legal-plain strong { color: #000; font-weight: 700; }
.legal-plain ul { margin: 0 0 8px 22px; color: #000; }
.legal-plain a { color: #2f4a8a; }
body:has(.legal-plain) .site-footer, .plain-page .site-footer { background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; margin-top: 0; padding-top: 20px; }
body:has(.legal-plain) .footer-socials a, body:has(.legal-plain) .footer-socials a:hover { background: none !important; border: 0 !important; box-shadow: none !important; transform: none; width: 40px; height: 40px; }
body:has(.legal-plain) .footer-socials a::before { display: none; }
@media (max-width: 640px) { .legal-plain h1 { font-size: .9rem; } }

/* ---------- Contact ---------- */
.contact { display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.contact-card { text-align: center; max-width: 420px; }
.contact-card p { color: var(--text-dim); margin-bottom: 26px; }
.telegram-btn { background: linear-gradient(135deg, #229ED9, #1b7fb0); box-shadow: 0 8px 24px -8px rgba(34,158,217,0.6); }

/* ---------- Social icon rows (dashboard + footer) ---------- */
.dash-socials, .footer-socials { display: flex; justify-content: center; align-items: center; gap: 28px; }
.dash-socials { margin-top: 32px; }
.dash-socials a, .footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; border: 1px solid var(--card-border); box-shadow: 0 8px 20px -12px rgba(30,55,140,.35);
  position: relative; overflow: hidden;
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1), border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.dash-socials a::before, .footer-socials a::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,90,77,0.35), transparent 70%);
  opacity: 0; transition: opacity 0.25s ease;
}
.dash-socials a:hover, .footer-socials a:hover {
  transform: translateY(-5px) scale(1.08); border-color: var(--accent-b);
  background: #f6f8fc;
  box-shadow: 0 12px 26px -10px rgba(47,111,235,0.5);
}
.dash-socials a:hover::before, .footer-socials a:hover::before { opacity: 1; }
.dash-socials a svg, .footer-socials a svg { position: relative; z-index: 1; transition: transform 0.25s ease; }
.dash-socials a:hover svg, .footer-socials a:hover svg { transform: scale(1.1); }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--card-border); border-radius: 36px 36px 0 0; margin-top: 40px; padding: 56px 24px 34px; box-shadow: 0 -20px 50px -40px rgba(30,55,140,.35); }
.footer-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 30px; }
.footer-brand-row { display: flex; align-items: center; gap: 12px; }
.footer-brand p { color: var(--text-dim); font-weight: 400; font-size: 0.92rem; margin-top: 4px; font-family: var(--font-body); }
.footer-socials { margin: 0 0 34px; }
.footer-links { display: flex; gap: 22px; justify-content: center; margin: 0 0 26px; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; font-weight: 600; position: relative; padding-bottom: 2px; transition: color 0.2s ease; }
.footer-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px;
  background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); transition: width 0.25s ease;
}
.footer-links a:hover { color: var(--accent-a); }
.footer-links a:hover::after { width: 100%; }
.disclaimer { color: #7d8496; font-size: 0.8rem; max-width: 640px; margin: 0 auto 14px; line-height: 1.6; }
.copyright { color: #9299ab; font-size: 0.8rem; }

/* ---------- Scroll-reveal (JS toggles reveal-in via IntersectionObserver) ---------- */
.reveal-init { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.22,1,.36,1); }
.reveal-init.reveal-in { opacity: 1; transform: translateY(0); }
.feature-card, .stat-card, .doc-block { will-change: transform; transform-style: preserve-3d; }

/* ---------- Admin: login screen ---------- */
.admin-lock-badge { background: linear-gradient(135deg, var(--accent-c), var(--accent-a)); }
.admin-error {
  background: #fff1f1; border: 1px solid rgba(229,72,77,0.35); color: #b42318;
  border-radius: 10px; padding: 10px 14px; font-size: 0.88rem; margin-bottom: 18px;
}
.admin-login-form { display: flex; flex-direction: column; gap: 14px; }
.admin-input {
  width: 100%; padding: 13px 16px; border-radius: 12px;
  background: #f6f8fc; border: 1px solid var(--card-border); color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.admin-input:focus {
  outline: none; border-color: var(--accent-a);
  box-shadow: 0 0 0 3px rgba(47,111,235,0.16);
}
.admin-login-btn { width: 100%; justify-content: center; }

/* ---------- Admin: dashboard ---------- */
.admin { max-width: 1240px; margin: 0 auto; padding: 40px 24px 80px; }
.admin-header-actions { display: flex; gap: 10px; flex-shrink: 0; }
.admin-toast {
  background: rgba(18,161,80,0.1); border: 1px solid rgba(18,161,80,0.35); color: #0f7a3d;
  border-radius: 12px; padding: 12px 16px; font-size: 0.9rem; margin-bottom: 24px;
}
.admin-settings-panel { margin-top: 10px; }
.admin-settings-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.admin-settings-form .admin-input { flex: 1; min-width: 240px; }

.admin-users-panel { padding: 30px; }
.admin-users-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.admin-users-header h2 { margin-bottom: 6px; }
.admin-users-header p { color: var(--text-dim); font-size: 0.92rem; }
.admin-search { max-width: 260px; }

.admin-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--card-border); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; white-space: nowrap; }
.admin-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--bg-soft); color: var(--text-dim); font-weight: 600;
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--card-border);
}
.admin-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--card-border); }
.admin-table tbody tr { transition: background 0.15s ease; }
.admin-table tbody tr:hover { background: rgba(47,111,235,0.04); }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-user-cell { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.admin-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.admin-avatar-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
  color: white; font-size: 0.78rem; font-weight: 700;
}
.admin-email-cell { color: var(--text-dim); }
.admin-key { color: var(--accent-a); font-size: 0.82rem; }
.admin-actions-cell { display: flex; gap: 8px; }
.admin-empty { text-align: center; color: var(--text-dim); padding: 30px !important; white-space: normal; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .bot-promo-inner { grid-template-columns: 1fr; }
}

/* Desktop: keep the signed-in bar (links + wallet + avatar + logout) inside the pill */
.nav-wallet-label { display: none; }
@media (min-width: 1101px) and (max-width: 1400px) {
  .nav-links-scroll a .i { display: none; }   /* icons stay in the mobile menu + wide screens */
  .nav-links-scroll a { padding: 8px 9px; }
}

/* Mobile / narrow-screen menu. Collapses earlier than the grids above so the
   full link row never gets squeezed. */
@media (max-width: 1100px) {
  .nav-links {
    position: fixed; top: 84px; left: 12px; right: 12px; bottom: 12px;
    background: var(--card); border: 1px solid var(--card-border); border-radius: 28px;
    box-shadow: 0 30px 70px -20px rgba(30,55,140,0.45);
    flex-direction: column; align-items: stretch;
    padding: 18px 16px 24px; gap: 0; overflow-y: auto;
    transform: translateX(100%);
    /* Fully hidden while closed. transform alone leaves the menu parked just off-screen,
       and zooming out reveals it without any click. */
    visibility: hidden; opacity: 0; pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s linear 0.3s;
  }
  .nav-links.open {
    transform: translateX(0); visibility: visible; opacity: 1; pointer-events: auto;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s;
  }
  .nav-toggle { display: flex; }
  .nav-wallet-label { display: inline; }

  .nav-links-scroll { flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
  .nav-links-scroll a { padding: 13px 14px; font-size: 1rem; border-radius: 14px; }
  .nav-links-scroll a .i { opacity: 0.85; }

  .nav-links-account {
    flex-direction: column; align-items: stretch; width: 100%; gap: 10px;
    margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--card-border);
  }
  .nav-wallet { justify-content: space-between; width: 100%; padding: 12px 16px; }
  .nav-avatar { padding: 10px 14px; background: #f6f8fc; border-radius: 14px; }
  .nav-links-account .btn { width: 100%; justify-content: center; }
}

/* ---------- Live icon system (replaces emoji site-wide) ---------- */
.i { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; vertical-align: -4px; color: currentColor; }
.i svg { display: block; width: 100%; height: 100%; }

.i-wave { animation: iconWave 2.6s ease-in-out infinite; transform-origin: 70% 75%; color: #f5a524; }
@keyframes iconWave {
  0%, 100% { transform: rotate(0deg); }
  12% { transform: rotate(16deg); } 24% { transform: rotate(-6deg); }
  36% { transform: rotate(16deg); } 48% { transform: rotate(-4deg); }
  60% { transform: rotate(8deg); } 75%, 100% { transform: rotate(0deg); }
}
.i-warning { color: #f5a524; animation: iconPulseSoft 2.2s ease-in-out infinite; }
.i-info { color: #0ea5e9; animation: iconPulseSoft 2.6s ease-in-out infinite; }
@keyframes iconPulseSoft { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.i-check { color: var(--green); }
.i-check svg path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: iconDraw .5s ease forwards; }
.i-cross { color: var(--red); }
.i-cross svg path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: iconDraw .4s ease forwards; }
@keyframes iconDraw { to { stroke-dashoffset: 0; } }
.i-lock, .i-unlocked { animation: iconBob 3.5s ease-in-out infinite; }
.i-unlocked { color: var(--green); }
.i-tools { animation: iconWrench 3s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes iconWrench { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-14deg); } }
.i-refresh { animation: iconSpin 3.6s linear infinite; }
@keyframes iconSpin { to { transform: rotate(360deg); } }
.i-doublecheck, .i-send { color: var(--tg-blue-a, #37AEE2); }
.i-search, .i-bolt, .i-headphones, .i-chart, .i-sliders, .i-globe, .i-note, .i-key,
.i-download, .i-box, .i-link, .i-mobile, .i-film, .i-shield, .i-trending, .i-chat {
  animation: iconPulseGentle 3.4s ease-in-out infinite;
}
@keyframes iconPulseGentle { 0%, 100% { opacity: 1; } 50% { opacity: .78; } }

.legal-icon .i, .doc-locked-icon .i, .lock-icon .i { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .i-wave, .i-warning, .i-info, .i-tools, .i-refresh,
  .i-search, .i-bolt, .i-headphones, .i-chart, .i-sliders, .i-globe, .i-note, .i-key,
  .i-download, .i-box, .i-link, .i-mobile, .i-film, .i-shield, .i-trending, .i-chat,
  .i-lock, .i-unlocked { animation: none !important; }
  .i-check svg path, .i-cross svg path { animation: none !important; stroke-dashoffset: 0; }
}

/* ---------- Pricing slider (shared: home page + dashboard "Available plans") ---------- */
.pricing-toggle-note { text-align: center; color: var(--text-dim); font-size: .88rem; margin: -18px auto 30px; max-width: 520px; }

.pricing-slider { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pricing-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 22px 2px 14px; flex: 1; scrollbar-width: none;
}
.pricing-track::-webkit-scrollbar { display: none; }
.pricing-track .price-card {
  flex: 0 0 auto; width: min(270px, 78vw); scroll-snap-align: start;
}
.slider-arrow {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--card-border); color: var(--text); box-shadow: 0 8px 20px -12px rgba(30,55,140,.4);
  cursor: pointer; transition: background .2s ease, border-color .2s ease, opacity .2s ease;
}
.slider-arrow:hover { background: #eef2fb; border-color: var(--accent-b); }
.slider-arrow:disabled { opacity: .35; cursor: default; }
.pricing-dots { display: flex; justify-content: center; gap: 7px; margin-bottom: 6px; }
.pricing-dot { width: 7px; height: 7px; border-radius: 50%; background: #d7deec; border: none; cursor: pointer; padding: 0; transition: background .2s ease, transform .2s ease; }
.pricing-dot.active { background: var(--accent-a); transform: scale(1.3); }
.pricing-swipe-hint { text-align: center; color: var(--text-dim); font-size: .78rem; display: none; align-items: center; justify-content: center; gap: 6px; margin-bottom: 18px; }
@media (max-width: 720px) {
  .slider-arrow { display: none; }
  .pricing-swipe-hint { display: flex; }
}

.price-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--card); border: 1px solid var(--card-border); border-radius: 24px; padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.price-card:hover { transform: translateY(-6px); border-color: #b7c9f2; box-shadow: var(--shadow-lg); }
.price-card.best {
  border-color: rgba(47,111,235,.45);
  background: linear-gradient(180deg, #eef2fb, var(--card) 55%);
  transform: scale(1.035);
  box-shadow: 0 22px 54px -22px rgba(47,111,235,.45);
}
.price-card.best:hover { transform: scale(1.035) translateY(-6px); box-shadow: 0 28px 60px -20px rgba(47,111,235,.55); }
.price-flag {
  position: absolute; top: -11px; left: 24px; padding: 3px 12px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
}
.price-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, #eef2fb, #dce8fd);
  border: 1px solid #c9d8f7;
  display: flex; align-items: center; justify-content: center; color: var(--accent-a);
}
.price-card.best .price-icon { background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); border-color: transparent; color: #fff; }
.price-card h3 { font-size: 1.2rem; }
.price-desc { color: var(--text-dim); font-size: .86rem; min-height: 1.4em; }
.price-amount { font: 800 2.3rem var(--font-head); letter-spacing: -.03em; line-height: 1; }
.price-amount small { font-size: .85rem; color: var(--text-dim); font-weight: 500; letter-spacing: 0; }
.price-specs { list-style: none; display: grid; gap: 9px; font-size: .9rem; }
.price-specs li { display: flex; align-items: center; gap: 10px; color: var(--text); }
.price-specs .i { color: var(--accent-a); flex-shrink: 0; }
.price-card .btn { justify-content: center; width: 100%; margin-top: auto; }
.pricing-empty { text-align: center; color: var(--text-dim); padding: 40px 24px; background: var(--card); border: 1px dashed #b7c9f2; border-radius: 24px; }
.pricing-foot { text-align: center; color: var(--text-dim); font-size: .85rem; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pricing-foot a { color: var(--accent-a); text-decoration: underline; text-underline-offset: 3px; }


/* =====================================================================
   Navbar frame — clean white bar, SaaS-landing style (ShopWave-like).
===================================================================== */
:root {
  --frame-text: var(--text-dim);
  --frame-line: var(--card-border);
}
.nav-inner {
  border: 1px solid var(--card-border);
  box-shadow: 0 1px 2px rgba(20,35,90,.04), 0 10px 28px -18px rgba(20,35,90,.18);
}
.nav-inner::before {
  background: rgba(255, 255, 255, 0.92);
}

/* links */
.nav-links-scroll a { color: var(--frame-text); }
.nav-links-scroll a:hover { color: var(--text); background: rgba(47,111,235,0.08); }
.nav-links-scroll a.active { color: var(--accent-a); background: #eef2fb; box-shadow: inset 0 0 0 1px rgba(47,111,235,0.18); }
.nav-links-scroll a.active .i { color: var(--accent-a); }

/* wallet, avatar, buttons */
.nav-avatar { color: var(--text); }
.nav-avatar img { border-color: var(--accent-a); }
.nav-inner .btn-primary { border-radius: 999px; }
.nav-inner .btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--card-border); box-shadow: none; }
.nav-inner .btn-ghost:hover { background: var(--bg-soft); }

/* hamburger */
.nav-toggle { background: #fff; border-color: var(--card-border); }
.nav-toggle span { background: var(--text); }

/* narrow screens: dropdown menu keeps the same light frame */
@media (max-width: 1100px) {
  .nav-links {
    background: #ffffff;
    border-color: var(--card-border);
    box-shadow: 0 24px 60px -20px rgba(20,35,90,.28);
  }
  .nav-links-account { border-top-color: var(--frame-line); }
  .nav-avatar { background: var(--bg-soft); }
}

/* ---------- Auth: email sign in / sign up / OTP ---------- */
.auth-alert {
  border-radius: 12px; padding: 11px 14px; font-size: 0.88rem; line-height: 1.45;
  text-align: left; margin: 0 0 18px;
}
.auth-alert-err { background: #fff1f1; border: 1px solid rgba(229,72,77,0.35); color: #b42318; }
.auth-alert-ok { background: rgba(18,161,80,0.1); border: 1px solid rgba(18,161,80,0.35); color: #0f7a3d; }

.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 22px 0 16px;
  color: var(--text-dim); font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--card-border); }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--bg-soft); border: 1px solid var(--card-border); border-radius: 14px; margin-bottom: 18px;
}
.auth-tab {
  border: 0; background: transparent; color: var(--text-dim); cursor: pointer;
  font: inherit; font-weight: 700; font-size: 0.9rem; padding: 9px 10px; border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.active { background: #fff; color: var(--accent-a); box-shadow: 0 6px 16px -10px rgba(30,55,140,.45); }

.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-form[hidden] { display: none; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > span:first-child { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.auth-input {
  width: 100%; padding: 13px 16px; border-radius: 12px;
  background: #f6f8fc; border: 1px solid var(--card-border); color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-input:focus { outline: none; border-color: var(--accent-a); box-shadow: 0 0 0 3px rgba(47,111,235,0.16); }
.auth-input:user-invalid { border-color: var(--red); }
.pw-wrap { position: relative; display: block; }
.pw-wrap .auth-input { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--accent-a); cursor: pointer;
  font: inherit; font-size: 0.82rem; font-weight: 700; padding: 6px 8px; border-radius: 8px;
}
.pw-toggle:hover { background: var(--bg-soft); }
.auth-link { align-self: flex-end; font-size: 0.85rem; font-weight: 600; color: var(--accent-a); margin-top: -4px; }
.auth-link:hover { text-decoration: underline; }
.auth-hint { margin: -2px 0 0 !important; font-size: 0.82rem !important; color: var(--text-dim); }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }

.otp-input { text-align: center; font-size: 1.5rem; font-weight: 700; letter-spacing: 0.5em; padding-left: calc(16px + 0.5em); }
.otp-timer { font-size: 0.85rem; color: var(--text-dim); text-align: center; margin-top: -4px; }
.otp-timer b { color: var(--text); font-variant-numeric: tabular-nums; }
.otp-timer.expired { color: #b42318; }
.auth-resend { margin-top: 14px; }
.auth-link-btn {
  border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 0.88rem;
  font-weight: 700; color: var(--accent-a); padding: 6px 10px; border-radius: 8px;
}
.auth-link-btn:hover:not(:disabled) { background: var(--bg-soft); }
.auth-link-btn:disabled { color: var(--text-dim); cursor: not-allowed; font-weight: 600; }
.auth-card .auth-note { margin-bottom: 0; }
@media (max-width: 480px) { .auth-card { padding: 36px 22px; } }

/* ---------- Auth card: compact layout on phones (shorter sign in / sign up card) ---------- */
@media (max-width: 480px) {
  .auth-screen { min-height: 0; align-items: flex-start; padding: 14px 14px 8px; }
  .auth-card { padding: 22px 18px 20px; border-radius: 24px; }
  .auth-card .logo-badge.lg { width: 44px; height: 44px; border-radius: 13px; margin-bottom: 8px; }
  .auth-card .logo-badge.lg svg { width: 22px; height: 22px; }
  .auth-card h1 { font-size: 1.3rem; margin: 2px 0 6px; }
  .auth-card p { margin-bottom: 14px; font-size: 0.85rem; line-height: 1.4; }
  .auth-divider { margin: 14px 0 10px; }
  .auth-tabs { margin-bottom: 12px; }
  .auth-tab { padding: 7px 10px; font-size: 0.86rem; }
  .auth-form { gap: 9px; }
  .auth-field { gap: 3px; }
  .auth-field > span:first-child { font-size: 0.78rem; }
  .auth-input { padding: 10px 14px; font-size: 0.92rem; border-radius: 11px; }
  .otp-input { font-size: 1.3rem; }
  .auth-hint { font-size: 0.76rem !important; line-height: 1.35; margin: 0 !important; }
  .auth-submit { margin-top: 2px; }
  .auth-note { margin-top: 12px; font-size: 0.76rem; line-height: 1.4; }
  .auth-card .auth-note { margin-top: 12px; }
  .auth-resend { margin-top: 8px; }
  .auth-alert { padding: 9px 12px; font-size: 0.82rem; margin-bottom: 12px; }
  .google-btn { padding-top: 11px; padding-bottom: 11px; }
}

/* ---------- Auth card: compact layout on desktop / tablet ---------- */
@media (min-width: 481px) {
  .auth-screen { min-height: 0; align-items: flex-start; padding: 28px 24px 12px; }
  .auth-card { max-width: 500px; padding: 30px 36px 26px; border-radius: 28px; }
  .auth-card .logo-badge.lg { width: 48px; height: 48px; border-radius: 14px; margin-bottom: 8px; }
  .auth-card .logo-badge.lg svg { width: 24px; height: 24px; }
  .auth-card h1 { font-size: 1.4rem; margin: 2px 0 6px; }
  .auth-card p { margin-bottom: 16px; font-size: 0.9rem; }
  .auth-divider { margin: 14px 0 10px; }
  .auth-tabs { margin-bottom: 12px; }
  .auth-tab { padding: 7px 10px; }
  .auth-form { gap: 10px; }
  .auth-field { gap: 4px; }
  .auth-input { padding: 10px 14px; }
  .auth-hint { font-size: 0.78rem !important; margin: 0 !important; }
  .auth-note { margin-top: 14px; font-size: 0.78rem; }
  .auth-card .auth-note { margin-top: 14px; }
  .auth-resend { margin-top: 8px; }
  .auth-alert { margin-bottom: 12px; }
  .google-btn { padding-top: 11px; padding-bottom: 11px; }
  /* Sign-up: password + confirm password side by side */
  #form-signup:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  #form-signup > * { grid-column: 1 / -1; }
  #form-signup > label:nth-of-type(3), #form-signup > label:nth-of-type(4) { grid-column: auto; }
}


/* =====================================================================
   Navbar tools (notification bell + hamburger) and compact mobile bar
===================================================================== */
.nav-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
@media (min-width: 1101px) {
  .nav-links { order: 2; }
  .nav-tools { order: 3; }
}
@media (min-width: 1101px) and (max-width: 1400px) {
  .nav-inner { gap: 10px; }
  .nav-links, .nav-links-account { gap: 8px; }
  .nav-links-scroll a { padding: 8px 8px; }
}

.notif-wrap { position: relative; }
.notif-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
  background: #fff; border: 1px solid var(--card-border); color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.notif-btn:hover, .notif-btn[aria-expanded="true"] { background: var(--bg-soft); border-color: #c9d8f7; color: var(--accent-a); }
.notif-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff; border: 2px solid #fff;
  font-size: 0.66rem; font-weight: 800; line-height: 14px; text-align: center; font-variant-numeric: tabular-nums;
}
.notif-badge[hidden] { display: none; }
.notif-btn.has-new .i-bell svg { animation: bellRing 3s ease-in-out infinite; transform-origin: 50% 12%; }
@keyframes bellRing {
  0%, 60%, 100% { transform: rotate(0); }
  66% { transform: rotate(14deg); } 72% { transform: rotate(-12deg); }
  78% { transform: rotate(8deg); }  84% { transform: rotate(-5deg); } 90% { transform: rotate(0); }
}

.notif-panel {
  display: none; position: absolute; right: -4px; top: calc(100% + 16px); z-index: 120;
  width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px);
  flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--card-border); border-radius: 22px;
  box-shadow: 0 24px 60px -20px rgba(20,35,90,.32);
}
.notif-panel.open { display: flex; animation: notifPop 0.22s ease; }
@keyframes notifPop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.notif-head { padding: 14px 18px 12px; border-bottom: 1px solid var(--card-border); font-size: 0.95rem; }
.notif-list { overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.notif-empty { padding: 28px 12px; text-align: center; color: var(--text-dim); font-size: 0.9rem; }
.notif-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; color: var(--text);
  transition: background 0.15s ease;
}
.notif-item + .notif-item { margin-top: 2px; }
.notif-item:hover { background: var(--bg-soft); }
.notif-item.is-new { background: #f3f7ff; }
.notif-item.is-new::after { content: ''; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-a); }
.notif-title {
  flex: 1; min-width: 0; font-weight: 700; font-size: 0.93rem; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}

/* Full notification page */
.notif-page { max-width: 720px; margin: 0 auto; padding: 28px 20px 80px; }
.notif-back { display: inline-block; margin-bottom: 16px; color: var(--accent-a); font-weight: 700; font-size: 0.9rem; }
.notif-back:hover { text-decoration: underline; text-underline-offset: 3px; }
.notif-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.notif-hero { display: block; width: 100%; max-height: 420px; object-fit: cover; background: var(--bg-soft); }
.notif-body { padding: 24px 24px 28px; }
.notif-meta { color: #8a90a2; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 8px; }
.notif-body h1 { font-size: 1.6rem; line-height: 1.25; color: var(--navy); overflow-wrap: anywhere; }
.notif-full { margin-top: 12px; color: var(--text-dim); font-size: 1rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .notif-page { padding: 18px 14px 60px; }
  .notif-body { padding: 18px 18px 22px; }
  .notif-body h1 { font-size: 1.3rem; }
}

/* Phones / tablets: the bar gets smaller so it stays light; the bell sits beside the menu button. */
@media (max-width: 720px) {
  .navbar { padding: 8px 12px 0; }
  .nav-inner { min-height: 52px; padding: 8px 10px 8px 14px; gap: 10px; }
  .nav-inner .brand { gap: 7px; }
  .nav-inner .logo-badge { width: 28px; height: 28px; border-radius: 9px; }
  .nav-inner .logo-badge svg { width: 15px; height: 15px; }
  .nav-inner .brand-name { font-size: 1.1rem; }
  .nav-tools { gap: 6px; }
  .nav-toggle, .notif-btn { width: 34px; height: 34px; border-radius: 11px; }
  .nav-toggle { gap: 4px; }
  .nav-toggle span { width: 14px; height: 2px; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .notif-btn .i { width: 17px !important; height: 17px !important; }
  .notif-badge { top: -4px; right: -4px; min-width: 16px; height: 16px; line-height: 12px; font-size: 0.6rem; padding: 0 4px; }
  .nav-links { top: 70px; }
  /* the panel spans the screen instead of hanging off the small bell */
  .notif-wrap { position: static; }
  .notif-panel { position: fixed; top: 70px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 88px); }
}
@media (prefers-reduced-motion: reduce) {
  .notif-btn.has-new .i-bell svg, .notif-panel.open { animation: none; }
}

/* =====================================================================
   Mobile side drawer (Option B): slim top bar  [menu] ArtistBots [bell]
   + menu that slides in from the left with profile card and links.
   Desktop (>1100px) is untouched.
===================================================================== */
.nav-overlay, .drawer-head, .nav-section-label, .logout-ico { display: none; }

@media (max-width: 1100px) {
  /* --- slim, full-width top bar --- */
  .navbar { padding: 0; }
  .nav-inner {
    max-width: none; margin: 0; min-height: 60px; padding: 10px 16px; gap: 10px;
    border-radius: 0; border: 0; border-bottom: 1px solid var(--card-border); box-shadow: none;
  }
  .nav-inner::before { background: rgba(255,255,255,0.94); }
  .nav-tools { display: contents; }                 /* let menu button + bell sit on either side of the brand */
  .nav-toggle { order: 1; }
  .nav-inner > .brand { order: 2; margin: 0 auto; }
  .notif-wrap { order: 3; }

  /* hamburger: three left-aligned lines, no X morph (the drawer covers it) */
  .nav-toggle {
    display: flex; align-items: flex-start; justify-content: center; gap: 4px;
    width: 38px; height: 38px; padding: 0 11px; border-radius: 12px;
    background: var(--bg-soft); border-color: transparent;
  }
  .nav-toggle span { width: 16px; height: 2px; background: var(--accent-a); }
  .nav-toggle span:nth-child(2) { width: 11px; }
  .nav-toggle.active span:nth-child(1), .nav-toggle.active span:nth-child(3) { transform: none; }
  .nav-toggle.active span:nth-child(2) { opacity: 1; }
  .notif-btn { width: 38px; height: 38px; border-radius: 12px; }

  /* --- dimmed backdrop --- */
  .nav-overlay {
    display: block; position: fixed; inset: 0; z-index: 1;
    background: rgba(17, 22, 40, 0.45);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  }
  .nav-overlay.show { opacity: 1; visibility: visible; transition: opacity 0.3s ease, visibility 0s; }
  body.nav-locked { overflow: hidden; }

  /* --- the drawer --- */
  .nav-links {
    z-index: 2;
    top: 0; left: 0; right: auto; bottom: 0;
    width: min(320px, 86vw);
    padding: 18px 14px 18px; gap: 0;
    background: #fff; border: 0; border-radius: 0 28px 28px 0;
    box-shadow: 0 0 60px rgba(17, 22, 40, 0.25);
    transform: translateX(-105%);
    display: flex; flex-direction: column; overflow: hidden;
  }
  .nav-links.open { transform: translateX(0); }

  .drawer-head { display: block; flex-shrink: 0; }
  .drawer-brand { margin: 2px 4px 14px; }
  .drawer-brand .logo-badge { width: 30px; height: 30px; border-radius: 9px; }
  .drawer-brand .brand-name { font-size: 1.15rem; }
  .drawer-profile {
    display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
    padding: 12px 14px; border-radius: 18px;
    background: linear-gradient(135deg, #f4f7ff, #e9f0ff); border: 1px solid #d5e1fb;
  }
  .drawer-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b)); color: #fff; font-weight: 800; font-size: 1.05rem;
  }
  .drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .drawer-user { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
  .drawer-user strong { font-size: 0.98rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .drawer-user small { font-size: 0.78rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* --- links --- */
  .nav-links-scroll { flex: 1; min-height: 0; overflow-y: auto; gap: 2px; margin: 0 -14px; padding: 0 14px; }
  .nav-links-scroll a {
    position: relative; display: flex; align-items: center; gap: 14px;
    padding: 12px 14px; border-radius: 14px; font-size: 0.98rem; font-weight: 700; color: var(--text-dim);
  }
  .nav-links-scroll a .i { display: inline-flex; opacity: 0.9; }
  .nav-links-scroll a.active { background: #e8f0ff; color: var(--accent-a); box-shadow: none; }
  .nav-links-scroll a.active::before {
    content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px;
    border-radius: 0 4px 4px 0; background: var(--accent-a);
  }
  .nav-section-label {
    display: block; margin: 14px 14px 4px; font-size: 0.68rem; font-weight: 800;
    letter-spacing: 0.1em; text-transform: uppercase; color: #8a90a2;
  }

  /* --- bottom: logout / sign in --- */
  .nav-links-account { flex-shrink: 0; margin-top: 12px; padding-top: 0; border-top: 0; }
  .nav-links-account .nav-avatar { display: none; }      /* shown in the profile card instead */
  .nav-links-account .btn { justify-content: center; padding: 12px 16px; font-size: 0.95rem; font-weight: 800; }
  .nav-logout.btn-ghost, .nav-inner .nav-logout.btn-ghost { color: var(--red); border: 1px solid #f4b8ba; background: #fff; }
  .nav-inner .nav-logout.btn-ghost:hover { background: #fff5f5; }
  .logout-ico { display: inline-block; }
}

@media (max-width: 720px) {
  .navbar { padding: 0; }
  .nav-inner { min-height: 58px; padding: 9px 14px; }
  .nav-inner .brand-name { font-size: 1.2rem; }
  .nav-inner .logo-badge { width: 30px; height: 30px; }
  .nav-toggle, .notif-btn { width: 38px; height: 38px; }
  .nav-toggle { gap: 4px; padding: 0 11px; }
  .nav-toggle span { width: 16px; }
  .nav-toggle span:nth-child(2) { width: 11px; }
  .notif-btn .i { width: 18px !important; height: 18px !important; }
  .nav-links { top: 0; }
  .notif-panel { top: 66px; }
}

/* =====================================================================
   Desktop (>1100px): menu bar = left sidebar, same layout as the admin panel.
   Phones / tablets keep the existing slide-in drawer (same ids, same JS).
===================================================================== */
@media (min-width: 1101px) {
  body { padding-left: 252px; }
  .navbar { position: fixed; top: 0; left: 0; bottom: 0; width: 252px; padding: 0; z-index: 250; }
  .nav-inner {
    height: 100%; max-width: none; margin: 0; min-height: 0;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr;
    column-gap: 8px; row-gap: 22px; padding: 22px 16px; overflow-y: auto;
    border-radius: 0; border: 0; border-right: 1px solid var(--card-border); box-shadow: none;
  }
  .nav-inner::before { background: rgba(255, 255, 255, 0.92); }
  .nav-inner > .brand { grid-column: 1; grid-row: 1; order: 0; padding: 2px 10px 0; }
  .nav-inner > .brand .brand-name { font-size: 1.2rem; }
  .nav-tools { grid-column: 2; grid-row: 1; order: 0; }
  .nav-toggle { display: none; }

  .nav-links { grid-column: 1 / -1; grid-row: 2; order: 0; flex-direction: column; align-items: stretch; gap: 0; }
  .nav-links-scroll { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-links-scroll a { gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 0.93rem; }
  .nav-links-scroll a .i { display: inline-flex; }
  .nav-section-label {
    display: block; padding: 10px 14px 6px; font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase; color: #8a90a2;
  }
  .nav-section-label:first-child { padding-top: 0; }

  .nav-links-account { flex-direction: column; align-items: stretch; gap: 8px; margin-top: auto; padding-top: 18px; }
  .nav-links-account .nav-avatar { padding: 10px 14px; border-radius: 12px; background: var(--bg-soft); }
  .nav-links-account .btn { justify-content: center; }

  /* bell sits next to the logo, its list opens over the page to the right of the sidebar */
  .notif-wrap { position: static; }
  .notif-panel { position: fixed; top: 16px; left: 264px; right: auto; }
}

/* Phones / tablets (<=1100px): the slide-in menu uses the same look as the admin panel's mobile sidebar
   (same colours as before - only the layout / shapes change). */
@media (max-width: 1100px) {
  .nav-toggle {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    width: 42px; height: 42px; padding: 0; border-radius: 12px; background: var(--card); border: 1px solid var(--card-border);
  }
  .nav-toggle span, .nav-toggle span:nth-child(2) { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

  .nav-overlay { background: rgba(24, 10, 12, 0.4); -webkit-backdrop-filter: none; backdrop-filter: none; }

  .nav-links {
    width: 264px; max-width: 86vw; padding: 22px 16px; border-radius: 0; background: #fff;
    border-right: 1px solid var(--card-border); box-shadow: 0 30px 70px -20px rgba(20, 35, 90, 0.35);
    overflow-y: auto; gap: 0;
  }
  .drawer-head { margin-bottom: 22px; }
  .drawer-brand { margin: 0; padding: 2px 10px 0; }
  .drawer-brand .logo-badge { width: 34px; height: 34px; border-radius: 10px; }
  .drawer-brand .brand-name { font-size: 1.2rem; }
  .drawer-profile { display: none; }

  .nav-links-scroll { margin: 0; padding: 0; gap: 4px; overflow: visible; flex: 1 0 auto; }
  .nav-links-scroll a { gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: 0.93rem; font-weight: 600; }
  .nav-links-scroll a.active { background: #eef2fb; color: var(--accent-a); box-shadow: inset 0 0 0 1px rgba(47, 111, 235, 0.18); }
  .nav-links-scroll a.active::before { content: none; }
  .nav-section-label { margin: 0; padding: 10px 14px 6px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; }
  .nav-section-label:first-child { padding-top: 0; }

  .nav-links-account { gap: 8px; margin-top: 18px; }
  .nav-links-account .nav-avatar { display: flex; padding: 10px 14px; border-radius: 12px; background: var(--bg-soft); }
  .nav-links-account .btn { padding: 10px 16px; font-size: 0.93rem; }
}

/* ===== API key card ===== */
.akey { position: relative; overflow: hidden; border-radius: 20px; padding: 22px; color: #eaf0ff;
  background: radial-gradient(120% 140% at 0% 0%, #1d4fc4 0%, #121f4a 55%, #0b1433 100%);
  box-shadow: 0 20px 44px -22px rgba(30,55,140,.7); }
.akey::after { content: ""; position: absolute; right: -60px; top: -60px; width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); pointer-events: none; }
.akey.is-off { background: radial-gradient(120% 140% at 0% 0%, #5a1d22 0%, #2a1216 60%, #160a0c 100%); }
.akey-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; position: relative; z-index: 1; }
.akey-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.akey-head { flex: 1; min-width: 0; }
.akey-title { font-weight: 800; font-size: 1.05rem; line-height: 1.2; }
.akey-sub { font-size: .8rem; opacity: .72; margin-top: 2px; }
.akey-chip { font-size: .74rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; background: rgba(255,255,255,.12); }
.akey-chip.on { color: #7dffb0; background: rgba(18,161,80,.22); }
.akey-chip.off { color: #ffb3b6; background: rgba(229,72,77,.25); }
.akey-chip.idle { color: #dbe6ff; }
.akey-field { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
  border-radius: 14px; background: rgba(5,10,30,.45); border: 1px solid rgba(255,255,255,.14); }
.akey-field code { flex: 1; min-width: 0; font-size: .95rem; font-weight: 600; letter-spacing: .02em; color: #fff;
  word-break: break-all; overflow-wrap: anywhere; background: none; border: 0; padding: 0; }
.akey-btns { display: flex; gap: 6px; flex-shrink: 0; }
.akey-btn { cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; padding: 8px 14px; border-radius: 10px;
  color: #eaf0ff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); transition: background .15s, transform .15s; }
.akey-btn:hover { background: rgba(255,255,255,.2); }
.akey-btn.primary { background: #fff; color: #1d4fc4; border-color: #fff; }
.akey-btn.primary:hover { background: #dbe6ff; }
.akey-btn:active { transform: scale(.97); }
.akey-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.akey-using { font-size: .84rem; opacity: .85; }
.akey-using b { color: #fff; }
.akey-revoke { cursor: pointer; font: inherit; font-size: .8rem; font-weight: 700; padding: 8px 14px; border-radius: 10px;
  color: #ffb3b6; background: rgba(229,72,77,.14); border: 1px solid rgba(229,72,77,.4); transition: background .15s; }
.akey-revoke:hover { background: rgba(229,72,77,.28); }
.akey-revoke:disabled, .akey-btn:disabled { opacity: .6; cursor: default; }
@media (max-width: 640px) {
  .akey { padding: 16px; border-radius: 16px; }
  .akey-field { flex-direction: column; align-items: stretch; padding: 12px; }
  .akey-field code { font-size: .82rem; }
  .akey-btns .akey-btn { flex: 1; }
  .akey-foot { flex-direction: column; align-items: stretch; }
  .akey-revoke { width: 100%; }
}


/* ---------- Sticky footer: short pages (login etc.) no longer leave an empty strip under the footer ---------- */
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
body > .site-footer { flex-shrink: 0; margin-top: 40px; }

/* ---------- Footer "buy source code" link + sales page ---------- */
.src-sale { margin: -8px 0 22px; font-size: .84rem; text-align: center; }
.src-sale a { color: var(--accent-a); font-weight: 700; border-bottom: 1px dashed currentColor; padding-bottom: 1px; }
.src-sale a:hover { color: var(--accent-b); }

.src-page { max-width: 880px; margin: 0 auto; padding: 40px 20px 60px; }
.src-hero { text-align: center; margin-bottom: 30px; }
.src-hero h1 { font-size: 2rem; color: var(--navy); margin-bottom: 10px; }
.src-hero p { color: var(--text-dim); max-width: 600px; margin: 0 auto 20px; }
.src-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 14px 0 28px; }
.src-card { background: var(--card); border: 1px solid var(--card-border); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }
.src-card h3 { font-size: 1.02rem; margin-bottom: 8px; color: var(--navy); }
.src-card ul { padding-left: 18px; color: var(--text-dim); font-size: .9rem; line-height: 1.65; }
.src-page h2 { font-size: 1.3rem; margin: 26px 0 6px; color: var(--navy); }
.src-page > p, .src-page li { color: var(--text-dim); }
.src-steps { padding-left: 20px; line-height: 1.8; font-size: .95rem; }
.src-cta { text-align: center; background: var(--card); border: 1px solid var(--card-border); border-radius: 22px; padding: 28px 20px; margin-top: 30px; box-shadow: var(--shadow); }
.src-cta h2 { margin-top: 0; }
.src-note { font-size: .82rem; color: var(--text-dim); margin-top: 14px; }
@media (max-width: 640px) {
  .src-grid { grid-template-columns: 1fr; }
  .src-hero h1 { font-size: 1.55rem; }
  .src-page { padding: 24px 14px 40px; }
}

/* ---- Donate page + small donate notes (Contact / Help) ---- */
.donate-page { max-width: 900px; margin: 0 auto; padding: 40px 20px 60px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.donate-copy h1 { font-size: 2rem; color: var(--navy); margin-bottom: 12px; }
.donate-copy p { color: var(--text-dim); line-height: 1.65; }
.donate-steps { margin: 18px 0 18px 20px; color: var(--text-dim); line-height: 1.75; }
.donate-steps strong { color: var(--text); }
.donate-small { font-size: .85rem; }
.donate-small a { color: var(--accent-a); font-weight: 700; }
.donate-qr { margin: 0; text-align: center; }
.donate-qr img { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto; border-radius: 18px; border: 1px solid var(--card-border); box-shadow: var(--shadow-lg); background: #fff; }
.donate-qr figcaption { margin-top: 12px; font-size: .85rem; color: var(--text-dim); }
.donate-note { max-width: 520px; margin: 22px auto 0; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; }
.donate-note p { color: var(--text-dim); font-size: .92rem; margin: 0; }
@media (max-width: 720px) {
  .donate-page { grid-template-columns: 1fr; gap: 26px; padding: 24px 14px 40px; }
  .donate-copy h1 { font-size: 1.55rem; }
  .donate-note { justify-content: center; text-align: center; }
}


/* ---------- Contact page ---------- */
.ct { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; }
.ct-head { text-align: center; margin-bottom: 30px; }
.ct-head h1 { font-size: 2.1rem; margin-bottom: 8px; color: var(--navy); }
.ct-head p { color: var(--text-dim); max-width: 520px; margin: 0 auto; }
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ct-card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; transition: transform .2s, border-color .2s; }
.ct-card:hover { transform: translateY(-4px); border-color: #b7c9f2; }
.ct-card h2 { font-size: 1.2rem; margin: 14px 0 4px; }
.ct-card p { color: var(--text-dim); font-size: .94rem; line-height: 1.6; margin: 0 0 20px; }
.ct-card .ct-tag { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-a); margin: 0 0 12px; }
.ct-card .btn { margin-top: auto; }
.ct-card small { display: block; margin-top: 12px; color: var(--text-dim); font-size: .82rem; }
.ct-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #fff; }
.ct-ico-chan { background: linear-gradient(135deg, #37AEE2, #1E96C8); }
.ct-ico-owner { background: linear-gradient(135deg, var(--accent-a), var(--accent-c)); }
.ct-tips { margin: 22px 0 0; padding: 20px 24px; background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); }
.ct-tips h3 { font-size: 1rem; margin-bottom: 8px; }
.ct-tips ul { margin: 0 0 0 18px; padding: 0; list-style: disc; color: var(--text-dim); font-size: .92rem; line-height: 1.8; }
@media (max-width: 640px) {
  .ct { padding: 28px 16px 60px; }
  .ct-head h1 { font-size: 1.6rem; }
  .ct-grid { grid-template-columns: 1fr; }
}
