/* Charge — "electric current" redesign. Depth via layered gradients + glass,
   movement via a hero marquee, scroll reveals, and ambient drift. */

:root {
  /* Palette */
  --void: #0b0a12; --void-2: #0e0c18;
  --purple-300: #c9b6ff; --purple-400: #a855f7; --purple-500: #9333ea; --purple-600: #7c3aed;
  --purple-700: #6d28d9; --purple-800: #5b21b6; --purple-900: #4c1d95; --purple-950: #2e1065;
  --yellow-300: #ffe066; --yellow-400: #ffd11a; --yellow-500: #ffc400; --yellow-600: #f5a300;

  --bg: var(--void);
  --surface: #16132455;        /* translucent — glass */
  --surface-solid: #171327;
  --surface-2: #1e1934; --surface-3: #271f42;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --text: #ece9f6; --muted: #a79fc4; --subtle: #6f6892;
  --success: #34d399; --danger: #f87171;

  --radius: 16px; --radius-sm: 11px; --radius-xs: 8px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --accent-grad: linear-gradient(135deg, #ffe066, #ffc400 55%, #f5a300);
  --purple-grad: linear-gradient(140deg, #8b5cf6, #6d28d9 60%, #4c1d95);
  --brand-grad: linear-gradient(120deg, #a855f7, #7c3aed 45%, #ffc400 140%);
  /* Glassy panel fill + inner top highlight */
  --glass: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.012));
  --glass-edge: inset 0 1px 0 rgba(255,255,255,0.08);
  --header-bg: rgba(11,10,18,0.72);
  --shadow: 0 22px 60px rgba(0,0,0,0.55);
  --glow: 0 18px 48px rgba(124,58,237,0.30);
}
:root[data-theme="light"] {
  --void: #f4f2fb; --void-2: #eceaf6;
  --bg: var(--void);
  --surface: #ffffffcc; --surface-solid: #ffffff; --surface-2: #f4f1fb; --surface-3: #ece7f7;
  --line: rgba(40,20,80,0.10); --line-2: rgba(40,20,80,0.16);
  --text: #1a1626; --muted: #5b5375; --subtle: #8b83a6;
  --glass: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.35));
  --glass-edge: inset 0 1px 0 rgba(255,255,255,0.9);
  --header-bg: rgba(244,242,251,0.78);
  --shadow: 0 22px 60px rgba(80,50,150,0.16);
  --glow: 0 18px 48px rgba(124,58,237,0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font); color: var(--text); line-height: 1.55; min-height: 100%;
  display: flex; flex-direction: column; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(900px 600px at 12% -5%, rgba(124,58,237,0.18), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(255,196,0,0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, .h1, .brand { font-family: var(--font-display); letter-spacing: -0.02em; }
#view { flex: 1 0 auto; }
::selection { background: rgba(168,85,247,0.4); }

/* ── Header (glass) ─────────────────────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1.5rem; background: var(--header-bg); backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.2rem; }
.brand svg { width: 30px; height: 30px; filter: drop-shadow(0 3px 8px rgba(255,196,0,0.35)); }
.brand .accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hnav { display: flex; align-items: center; gap: 0.25rem; }
.hnav .link { padding: 0.5rem 0.8rem; border-radius: var(--radius-xs); color: var(--muted); font-weight: 600; font-size: 0.92rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; transition: color .15s, background .15s; }
.hnav .link:hover { background: var(--surface-2); color: var(--text); }
.hright { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; background: var(--surface-solid);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0.4rem; box-shadow: var(--shadow);
  display: none; transform-origin: top; }
.dd.open .dd-menu { display: block; animation: pop .16s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; } }
.dd-menu a { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.6rem; border-radius: var(--radius-xs); color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.dd-menu a:hover { background: var(--surface-2); color: var(--text); }
.dd-menu a svg { width: 18px; height: 18px; color: var(--purple-400); }
.userchip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.7rem 0.35rem 0.4rem; border-radius: 9999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.85rem; font-weight: 600; }
.av { width: 22px; height: 22px; border-radius: 50%; background: var(--purple-grad); display: grid; place-items: center; font-size: 0.72rem; color: #fff; }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; white-space: nowrap;
  padding: 0.55rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  font-weight: 600; font-size: 0.9rem; background: var(--surface-2); color: var(--text);
  transition: transform .08s ease, box-shadow .2s, background .15s, border-color .15s, filter .15s; }
.btn:hover { background: var(--surface-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--purple-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgba(124,58,237,0.4); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(124,58,237,0.55); }
.btn-accent { background: var(--accent-grad); color: #2e1065; border: none; font-weight: 700; box-shadow: 0 8px 22px rgba(255,196,0,0.32); }
.btn-accent:hover { box-shadow: 0 12px 30px rgba(255,196,0,0.45); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.84rem; }
.btn-lg { padding: 0.72rem 1.5rem; font-size: 1rem; }
.icon-btn { width: 38px; height: 38px; padding: 0; justify-content: center; }
.icon-btn svg { width: 18px; height: 18px; }

/* ── Layout primitives ──────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; width: 100%; }
.h1 { font-size: 1.8rem; margin-bottom: 0.35rem; }
.sub { color: var(--muted); margin-bottom: 1.5rem; }
.muted { color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 3rem 0 1.2rem; }
.section-head h2 { font-size: 1.5rem; }
.section-head .ey { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--purple-400); font-weight: 700; margin-bottom: 0.3rem; }
.section-head a { color: var(--purple-300); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.3rem; }
.section-head a:hover { color: var(--yellow-500); }

/* glassy panel mixin */
.glass { background: var(--glass), var(--surface-solid); background-blend-mode: overlay, normal;
  border: 1px solid var(--line); box-shadow: var(--glass-edge); backdrop-filter: blur(8px); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 6rem 1.5rem 2.5rem; overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: -2;
  background:
    radial-gradient(46% 46% at 50% 0%, rgba(124,58,237,0.45), transparent 72%),
    radial-gradient(34% 40% at 82% 18%, rgba(255,196,0,0.12), transparent 70%),
    radial-gradient(30% 36% at 16% 26%, rgba(168,85,247,0.20), transparent 72%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); z-index: -3; opacity: 0.55; pointer-events: none; }
.orb.a { width: 360px; height: 360px; left: 6%; top: 4%; background: radial-gradient(circle, #7c3aed, transparent 70%); animation: drift1 16s ease-in-out infinite; }
.orb.b { width: 300px; height: 300px; right: 8%; top: 30%; background: radial-gradient(circle, #ffc400, transparent 70%); opacity: 0.28; animation: drift2 20s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(40px,30px); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-50px,24px); } }

.hero .eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.9rem; border-radius: 9999px;
  background: rgba(124,58,237,0.14); border: 1px solid rgba(168,85,247,0.4); color: var(--purple-300);
  font-size: 0.8rem; font-weight: 700; box-shadow: var(--glass-edge); }
.hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow-500); box-shadow: 0 0 10px var(--yellow-500); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; margin-top: 1.3rem; }
.hero h1 .accent { position: relative; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.28rem); max-width: 40rem; margin: 1.2rem auto 0; }
.hero .cta { display: flex; gap: 0.8rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.hero .stats { display: flex; gap: 2.4rem; justify-content: center; margin-top: 2.4rem; flex-wrap: wrap; }
.hero .stat .n { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; }
.hero .stat .l { color: var(--subtle); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* page-load stagger */
.fadeup { opacity: 0; transform: translateY(16px); animation: fadeup .7s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes fadeup { to { opacity: 1; transform: none; } }

/* ── Hero marquee (the signature movement) ──────────────────────────────── */
.marquee { margin-top: 3rem; display: flex; flex-direction: column; gap: 1rem; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.mrow { display: flex; gap: 1rem; width: max-content; animation: scrollL 46s linear infinite; }
.mrow.rev { animation: scrollR 52s linear infinite; }
.marquee:hover .mrow { animation-play-state: paused; }
@keyframes scrollL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scrollR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.mcard { display: flex; align-items: center; gap: 0.75rem; width: 252px; flex: none; padding: 0.7rem 0.85rem;
  background: var(--glass), var(--surface-solid); background-blend-mode: overlay, normal;
  border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--glass-edge); }
.mcard .mi { width: 42px; height: 42px; flex: none; border-radius: 10px; background: var(--purple-grad);
  display: grid; place-items: center; color: var(--yellow-500); font-weight: 700; overflow: hidden; }
.mcard .mi svg { width: 22px; height: 22px; } .mcard .mi img { width: 100%; height: 100%; object-fit: cover; }
.mcard .mt { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard .ms { color: var(--subtle); font-size: 0.76rem; }

/* ── Scroll reveal ──────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Content-type tiles ─────────────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.9rem; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 1.4rem 0.8rem;
  background: var(--glass), var(--surface-solid); background-blend-mode: overlay, normal;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--glass-edge);
  text-align: center; overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .25s; }
.tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 0%, rgba(124,58,237,0.22), transparent 70%); opacity: 0; transition: opacity .25s; }
.tile:hover { transform: translateY(-4px); border-color: rgba(168,85,247,0.5); box-shadow: var(--glow); }
.tile:hover::after { opacity: 1; }
.tile .ti { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(168,85,247,0.25), rgba(124,58,237,0.12)); color: var(--yellow-500);
  border: 1px solid var(--line); }
.tile .ti svg { width: 24px; height: 24px; }
.tile .tl { font-family: var(--font-display); font-weight: 600; font-size: 0.96rem; }
.tile .tc { color: var(--subtle); font-size: 0.78rem; }

/* ── Project cards ──────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 800px) { .grid { grid-template-columns: 1fr; } }
.pcard { position: relative; display: flex; gap: 1rem; padding: 1.1rem;
  background: var(--glass), var(--surface-solid); background-blend-mode: overlay, normal;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--glass-edge);
  transition: transform .15s, border-color .15s, box-shadow .25s; }
.pcard:hover { transform: translateY(-3px); border-color: rgba(168,85,247,0.45); box-shadow: var(--glow); }
.pcard .icon { width: 72px; height: 72px; flex: none; border-radius: var(--radius-sm); background: var(--purple-grad);
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; color: var(--yellow-500); overflow: hidden; }
.pcard .icon img { width: 100%; height: 100%; object-fit: cover; }
.pcard .body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.pcard .title { font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; }
.pcard .by { color: var(--subtle); font-size: 0.82rem; }
.pcard .by b { color: var(--purple-300); font-weight: 600; }
.pcard .summary { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .foot { display: flex; align-items: center; gap: 0.9rem; margin-top: auto; padding-top: 0.7rem; color: var(--subtle); font-size: 0.8rem; flex-wrap: wrap; }
.pcard .foot .stat { display: inline-flex; align-items: center; gap: 0.3rem; }
.pcard .foot svg { width: 14px; height: 14px; }
.tag { display: inline-block; padding: 0.16rem 0.6rem; border-radius: 9999px; font-size: 0.72rem; font-weight: 600;
  background: rgba(124,58,237,0.16); border: 1px solid var(--line-2); color: var(--purple-300); }

/* ── Creators band ──────────────────────────────────────────────────────── */
.band { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2rem; align-items: center;
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(124,58,237,0.22), transparent 60%),
    radial-gradient(70% 120% at 100% 100%, rgba(255,196,0,0.10), transparent 60%),
    var(--surface-solid);
  border: 1px solid var(--line-2); border-radius: 22px; padding: 2.6rem; margin-top: 3.5rem; overflow: hidden; box-shadow: var(--glass-edge); }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 1.8rem; } }
.band h2 { font-size: 1.9rem; }
.band h2 .accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.band p { color: var(--muted); margin: 0.7rem 0 1.4rem; }
.band ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; }
.band li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }
.band li svg { width: 18px; height: 18px; color: var(--success); flex: none; }
.band .visual { aspect-ratio: 4/3; border-radius: 18px; display: grid; place-items: center;
  background: radial-gradient(circle at 32% 28%, rgba(255,196,0,0.3), transparent 55%), var(--purple-grad);
  box-shadow: 0 24px 60px rgba(124,58,237,0.4); position: relative; overflow: hidden; }
.band .visual svg { width: 42%; height: 42%; filter: drop-shadow(0 10px 26px rgba(255,196,0,0.5)); animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(2deg); } }

/* ── Browse page ────────────────────────────────────────────────────────── */
.browse-top { margin-bottom: 1.5rem; }
.browse-search { position: relative; }
.browse-search input { width: 100%; padding: 0.9rem 1rem 0.9rem 2.9rem; font-size: 1rem;
  background: var(--glass), var(--surface-solid); background-blend-mode: overlay, normal;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); outline: none; box-shadow: var(--glass-edge); }
.browse-search input:focus { border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(124,58,237,0.25); }
.browse-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--subtle); }
.layout { display: grid; grid-template-columns: 230px 1fr; gap: 1.75rem; align-items: start; }
@media (max-width: 800px) { .layout { grid-template-columns: 1fr; } }
.sidebar { position: sticky; top: 5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.facet h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--subtle); margin-bottom: 0.6rem; }
.facet a { display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.7rem; border-radius: var(--radius-xs); color: var(--muted); font-size: 0.9rem; }
.facet a svg { width: 16px; height: 16px; }
.facet a:hover { background: var(--surface-2); color: var(--text); }
.facet a.active { background: rgba(124,58,237,0.2); color: var(--purple-300); font-weight: 600; }

/* ── Project detail ─────────────────────────────────────────────────────── */
.detail-head { display: flex; gap: 1.4rem; align-items: flex-start; margin-bottom: 1.5rem; }
.detail-head .icon { width: 96px; height: 96px; flex: none; border-radius: var(--radius); background: var(--purple-grad);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--yellow-500); overflow: hidden; box-shadow: var(--glow); }
.detail-head .icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-head h1 { font-size: 2rem; }
.detail-head .summary { color: var(--muted); margin-top: 0.3rem; }
.section { background: var(--glass), var(--surface-solid); background-blend-mode: overlay, normal;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--glass-edge); }
.section h2 { font-size: 1.2rem; margin-bottom: 0.9rem; }
.prose { color: var(--text); white-space: pre-wrap; word-wrap: break-word; }
.version { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; margin-bottom: 0.8rem; background: rgba(255,255,255,0.015); }
.version .vhead { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.version .vname { font-family: var(--font-display); font-weight: 600; } .version .vnum { font-family: var(--mono); color: var(--muted); font-size: 0.85rem; }
.badge { padding: 0.1rem 0.5rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.badge.release { background: rgba(52,211,153,0.16); color: var(--success); }
.badge.beta { background: rgba(255,196,0,0.16); color: var(--yellow-500); }
.badge.alpha { background: rgba(248,113,113,0.16); color: var(--danger); }
.file-row { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.file-row .fname { font-family: var(--mono); font-size: 0.85rem; } .file-row .fsize { color: var(--subtle); font-size: 0.8rem; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form { max-width: 32rem; margin: 0 auto; } .form.wide { max-width: 46rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 0.6rem 0.8rem; background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: var(--radius-xs); outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(124,58,237,0.22); }
.field textarea { min-height: 7rem; resize: vertical; }
.field .hint { color: var(--subtle); font-size: 0.78rem; margin-top: 0.3rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .row2 { grid-template-columns: 1fr; } }
.card-panel { background: var(--glass), var(--surface-solid); background-blend-mode: overlay, normal;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--glass-edge); }

/* ── Settings / icon upload ─────────────────────────────────────────────── */
.icon-upload { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.icon-upload .preview { width: 84px; height: 84px; flex: none; border-radius: var(--radius-sm); background: var(--purple-grad);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--yellow-500); overflow: hidden; }
.icon-upload .preview img { width: 100%; height: 100%; object-fit: cover; }
.danger-zone { border: 1px solid rgba(248,113,113,0.4); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; margin-top: 1rem; background: rgba(248,113,113,0.05); }
.danger-zone h3 { color: var(--danger); font-size: 0.95rem; margin-bottom: 0.3rem; }
.btn-danger { background: rgba(248,113,113,0.14); border-color: rgba(248,113,113,0.5); color: #fecaca; }
.btn-danger:hover { background: rgba(248,113,113,0.24); }
.btn.following { background: rgba(124,58,237,0.2); border-color: var(--purple-500); color: var(--purple-300); box-shadow: none; }

/* ── Mobile menu ────────────────────────────────────────────────────────── */
.menu-btn { display: none; }
.theme-btn { background: transparent; border-color: transparent; color: var(--muted); }
.theme-btn:hover { background: var(--surface-2); color: var(--text); }
.mobile-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
  gap: 0.3rem; padding: 0.8rem 1.2rem 1.1rem; background: var(--surface-solid); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow); }
.mobile-menu.open { display: flex; animation: pop .18s ease; }
.mobile-menu .mlink { padding: 0.7rem 0.6rem; border-radius: var(--radius-xs); color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 0.6rem; }
.mobile-menu .mlink:hover { background: var(--surface-2); }
.mobile-menu .mlink svg { width: 18px; height: 18px; color: var(--purple-400); }
.mobile-menu .divider { height: 1px; background: var(--line); margin: 0.5rem 0; }
.mobile-menu .auth-row { display: flex; gap: 0.5rem; margin-top: 0.3rem; }
.mobile-menu .auth-row .btn { flex: 1; justify-content: center; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { flex-shrink: 0; border-top: 1px solid var(--line); margin-top: 3rem; background: linear-gradient(180deg, transparent, rgba(124,58,237,0.06)); }
.footer .inner { max-width: 1200px; margin: 0 auto; padding: 2.6rem 1.5rem; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 760px) { .footer .inner { grid-template-columns: 1fr 1fr; } }
.footer .brandcol .brand { margin-bottom: 0.8rem; }
.footer .brandcol p { color: var(--subtle); font-size: 0.86rem; max-width: 22rem; }
.footer h4 { font-family: var(--font-display); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--subtle); margin-bottom: 0.8rem; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer a { color: var(--muted); font-size: 0.88rem; } .footer a:hover { color: var(--yellow-500); }
.footer .bar { border-top: 1px solid var(--line); text-align: center; padding: 1.1rem; color: var(--subtle); font-size: 0.82rem; }

/* ── Misc ───────────────────────────────────────────────────────────────── */
.empty { text-align: center; color: var(--muted); padding: 4rem 1rem; }
.empty .bolt { font-size: 2.5rem; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line-2); border-top-color: var(--purple-500); border-radius: 50%; animation: spin .8s linear infinite; margin: 4rem auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: var(--surface-solid);
  border: 1px solid var(--line-2); padding: 0.7rem 1.1rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); z-index: 60; font-size: 0.9rem; max-width: 90vw; }
.toast.error { border-color: var(--danger); color: #fecaca; }
.toast.success { border-color: var(--success); color: #bbf7d0; }

@media (max-width: 720px) {
  .header { padding: 0.6rem 1rem; }
  .hnav, .hright { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .container { padding: 1.25rem 1rem 3rem; }
  .hero { padding: 4rem 1.1rem 2rem; }
  .section-head { margin: 2.2rem 0 1rem; } .section-head h2 { font-size: 1.25rem; }
  .detail-head .icon { width: 68px; height: 68px; font-size: 1.8rem; } .detail-head h1 { font-size: 1.5rem; }
  .footer .inner { padding: 2rem 1.1rem; gap: 1.4rem; }
}
@media (max-width: 420px) { .pcard .icon { width: 56px; height: 56px; font-size: 1.4rem; } }

/* Respect reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  .mrow, .orb, .band .visual svg, .hero .eyebrow .dot { animation: none !important; }
  .fadeup { animation: none; opacity: 1; transform: none; }
  .reveal { transition: none; opacity: 1; transform: none; }
}
