/* ================================================
   Aura — Design System
   Dark, glass, neon-holo. Mobile-first.
================================================ */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#0a0514;
  --bg-2:#12082a;
  --surface:rgba(255,255,255,.04);
  --surface-2:rgba(255,255,255,.07);
  --border:rgba(255,255,255,.09);
  --text:#f4f0ff;
  --muted:#a99fc7;
  --primary:#c084fc;
  --accent:#f472b6;
  --fan:#22d3ee;
  --hate:#ef4444;
  --gold:#f5d06f;
  --grad-hero:linear-gradient(135deg,#c084fc 0%,#f472b6 50%,#f97316 100%);
  --grad-verified:linear-gradient(135deg,#f5d06f,#e879f9,#60a5fa);
  --shadow-glow:0 20px 60px -20px rgba(192,132,252,.5);
  --radius:18px;
}
html,body{background:var(--bg);color:var(--text);font-family:'Plus Jakarta Sans',system-ui,-apple-system,sans-serif;-webkit-font-smoothing:antialiased;min-height:100vh;overflow-x:hidden}
body{background:
  radial-gradient(1200px 700px at 10% -10%, rgba(192,132,252,.25), transparent 60%),
  radial-gradient(900px 600px at 110% 10%, rgba(244,114,182,.2), transparent 60%),
  radial-gradient(700px 500px at 50% 100%, rgba(96,165,250,.15), transparent 60%),
  var(--bg);
  background-attachment:fixed;
}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button,input,textarea,select{font:inherit;color:inherit}

.app-shell{max-width:520px;margin:0 auto;min-height:100vh;padding-bottom:90px;position:relative}

/* Topbar */
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;padding:14px 18px;backdrop-filter:blur(20px) saturate(160%);background:linear-gradient(180deg,rgba(10,5,20,.85),rgba(10,5,20,.4))}
.brand{font-family:'Instrument Serif',serif;font-size:30px;background:var(--grad-hero);-webkit-background-clip:text;background-clip:text;color:transparent;letter-spacing:-.5px}
.topbar-actions{display:flex;align-items:center;gap:12px}
.icon-btn{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--surface);border:1px solid var(--border)}
.icon-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.me-avatar img{width:38px;height:38px;border-radius:50%;object-fit:cover;border:2px solid transparent;background:linear-gradient(var(--bg),var(--bg)) padding-box,var(--grad-hero) border-box}

.content{padding:8px 16px 20px}

/* Tabbar */
.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:520px;display:grid;grid-template-columns:repeat(5,1fr);padding:10px 14px calc(10px + env(safe-area-inset-bottom));backdrop-filter:blur(24px) saturate(160%);background:linear-gradient(0deg,rgba(10,5,20,.95),rgba(10,5,20,.7));border-top:1px solid var(--border);z-index:50}
.tabbar a{display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--muted);font-size:10px;font-weight:600;padding:6px 0;transition:color .2s}
.tabbar a svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tabbar a.active{color:var(--text)}
.tabbar a.active svg{stroke:url(#g);filter:drop-shadow(0 0 8px rgba(192,132,252,.6))}
.tabbar a.fab-tab{background:var(--grad-hero);color:#fff;width:52px;height:52px;border-radius:16px;justify-self:center;align-self:center;justify-content:center;box-shadow:var(--shadow-glow)}
.tabbar a.fab-tab svg{width:26px;height:26px;stroke:#fff;stroke-width:2.5}

/* Cards / posts */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;backdrop-filter:blur(10px)}
.post{margin-bottom:16px;animation:fadeUp .5s ease both}
.post-head{display:flex;align-items:center;gap:10px;padding:12px 14px}
.post-head img.av{width:40px;height:40px;border-radius:50%;object-fit:cover}
.post-head .u{font-weight:700;font-size:14px;display:flex;align-items:center;gap:4px}
.post-head .t{font-size:11px;color:var(--muted)}
.post-media{position:relative;background:#000;aspect-ratio:1/1;overflow:hidden;cursor:pointer}
.post-media img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
.post-media:hover img{transform:scale(1.03)}
.post-actions{display:flex;gap:16px;padding:12px 14px 4px}
.post-actions button{background:none;border:0;color:var(--text);display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600;cursor:pointer}
.post-actions svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.post-actions .liked svg{fill:var(--accent);stroke:var(--accent)}
.post-body{padding:6px 14px 14px;font-size:14px;line-height:1.4}
.post-body .u{font-weight:700;margin-right:6px}

/* Stories rail */
.stories-rail{display:flex;gap:14px;padding:14px 4px 18px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.stories-rail::-webkit-scrollbar{display:none}
.story-item{flex:0 0 auto;text-align:center;scroll-snap-align:start;cursor:pointer}
.story-ring{width:72px;height:72px;border-radius:50%;padding:3px;background:var(--grad-hero);position:relative}
.story-ring.seen{background:linear-gradient(#333,#333)}
.story-ring.mine{background:linear-gradient(135deg,#f5d06f,#e879f9,#60a5fa);box-shadow:0 0 24px rgba(232,121,249,.5)}
.story-ring img{width:100%;height:100%;border-radius:50%;object-fit:cover;border:3px solid var(--bg)}
.story-item.mine .story-ring::after{content:'+';position:absolute;bottom:-2px;right:-2px;background:var(--grad-hero);color:#fff;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:16px;border:2px solid var(--bg)}
.story-item .name{margin-top:6px;font-size:11px;color:var(--muted);max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.story-item.mine .name{color:var(--text);font-weight:700}
.story-mine-label{background:var(--grad-hero);-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:800}

/* Verified badge */
.verified-badge{display:inline-grid;place-items:center;width:16px;height:16px;vertical-align:middle;filter:drop-shadow(0 0 6px rgba(232,121,249,.6));animation:shine 3s ease-in-out infinite}
.verified-badge svg{width:100%;height:100%}
.verified-badge.lg{width:22px;height:22px}
@keyframes shine{0%,100%{filter:drop-shadow(0 0 6px rgba(232,121,249,.6))}50%{filter:drop-shadow(0 0 14px rgba(245,208,111,.8))}}

/* Profile */
.profile-header{position:relative;padding:20px 16px 0;text-align:center}
.profile-avatar{width:112px;height:112px;margin:0 auto;border-radius:50%;padding:4px;background:var(--grad-hero);box-shadow:var(--shadow-glow)}
.profile-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;border:4px solid var(--bg)}
.profile-name{font-size:22px;font-weight:800;margin-top:14px;display:inline-flex;align-items:center;gap:6px}
.profile-user{color:var(--muted);font-size:14px;margin-top:2px}
.profile-bio{margin:12px auto;max-width:340px;font-size:14px;color:#d8d1ef;line-height:1.5}
.profile-stats{display:flex;justify-content:center;gap:10px;margin:16px 0}
.stat-pill{background:var(--surface);border:1px solid var(--border);padding:10px 18px;border-radius:14px;min-width:88px}
.stat-pill .n{font-weight:800;font-size:18px;display:block}
.stat-pill .l{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
.stat-pill.fan .n{color:var(--fan)}
.stat-pill.hate .n{color:var(--hate)}
.profile-actions{display:flex;gap:8px;justify-content:center;padding:0 16px}
.btn{padding:12px 18px;border-radius:12px;border:0;font-weight:700;font-size:14px;cursor:pointer;transition:transform .15s,filter .2s;display:inline-flex;align-items:center;gap:6px;justify-content:center}
.btn:active{transform:scale(.97)}
.btn-fan{background:linear-gradient(135deg,#22d3ee,#0ea5e9);color:#001b25;flex:1}
.btn-hate{background:linear-gradient(135deg,#ef4444,#b91c1c);color:#fff;flex:1}
.btn-ghost{background:var(--surface);border:1px solid var(--border);color:var(--text)}
.btn-primary{background:var(--grad-hero);color:#fff}
.btn-block{width:100%}
.btn.active{filter:brightness(1.2);box-shadow:0 0 0 2px rgba(255,255,255,.15) inset}

.spotify-wrap{margin:16px 16px 0;border-radius:12px;overflow:hidden;border:1px solid var(--border)}

/* Grid */
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;margin-top:16px}
.grid-3 a{aspect-ratio:1/1;background:#111;overflow:hidden;position:relative;display:block;cursor:pointer}
.grid-3 img{width:100%;height:100%;object-fit:cover;transition:transform .4s,filter .3s}
.grid-3 a:hover img{transform:scale(1.06);filter:brightness(1.1)}
.grid-empty{text-align:center;color:var(--muted);padding:40px 16px}

/* Auth */
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.auth-card{width:100%;max-width:400px;background:rgba(255,255,255,.04);border:1px solid var(--border);border-radius:28px;padding:32px 26px;backdrop-filter:blur(20px);box-shadow:0 30px 80px -20px rgba(0,0,0,.6);animation:fadeUp .6s ease}
.auth-brand{font-family:'Instrument Serif',serif;font-size:56px;background:var(--grad-hero);-webkit-background-clip:text;background-clip:text;color:transparent;text-align:center;line-height:1}
.auth-sub{text-align:center;color:var(--muted);margin:6px 0 26px;font-size:14px}
.field{margin-bottom:14px}
.field label{display:block;font-size:12px;color:var(--muted);margin-bottom:6px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}
.field input,.field textarea,.field select{width:100%;background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:14px 16px;transition:border-color .2s,box-shadow .2s;outline:none}
.field input:focus,.field textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(192,132,252,.15)}
.auth-alt{text-align:center;margin-top:16px;font-size:13px;color:var(--muted)}
.auth-alt a{color:var(--primary);font-weight:700}
.error{background:rgba(239,68,68,.15);border:1px solid rgba(239,68,68,.35);color:#fca5a5;padding:12px 14px;border-radius:12px;font-size:13px;margin-bottom:14px}
.success{background:rgba(34,211,238,.13);border:1px solid rgba(34,211,238,.35);color:#a5f3fc;padding:12px 14px;border-radius:12px;font-size:13px;margin-bottom:14px}

/* Composer */
.composer{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:16px}
.composer textarea{width:100%;background:transparent;border:0;resize:none;min-height:80px;font-size:15px}
.composer-tools{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.upload-preview{margin-top:10px;border-radius:12px;overflow:hidden;max-height:300px}
.upload-preview img{width:100%;object-fit:cover}

/* Suggestions */
.section-title{font-weight:800;font-size:16px;margin:18px 0 10px;display:flex;align-items:center;justify-content:space-between}
.suggest-row{display:flex;gap:12px;padding:6px 0 18px;overflow-x:auto}
.suggest-row::-webkit-scrollbar{display:none}
.suggest-card{flex:0 0 160px;background:var(--surface);border:1px solid var(--border);border-radius:18px;padding:16px 12px;text-align:center}
.suggest-card img{width:64px;height:64px;border-radius:50%;margin:0 auto 8px;object-fit:cover;border:2px solid transparent;background:linear-gradient(var(--bg),var(--bg)) padding-box,var(--grad-hero) border-box;padding:2px}
.suggest-card .n{font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.suggest-card .u{font-size:11px;color:var(--muted);margin-bottom:10px}
.suggest-card .btn{width:100%;padding:8px}

/* Modals: post viewer & story viewer */
.modal{position:fixed;inset:0;background:rgba(0,0,0,.85);z-index:100;display:none;align-items:center;justify-content:center;animation:fade .2s}
.modal.open{display:flex}
.modal-close{position:absolute;top:16px;right:16px;background:rgba(255,255,255,.1);border:0;color:#fff;width:40px;height:40px;border-radius:50%;font-size:20px;cursor:pointer;z-index:2}
.viewer{max-width:520px;width:100%;height:100%;position:relative;overflow-y:auto;background:var(--bg)}
.viewer .post{margin:0;border-radius:0}

/* Story viewer */
.story-viewer{position:fixed;inset:0;z-index:100;display:none;background:#000}
.story-viewer.open{display:block;animation:fade .25s}
.story-bg{position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(40px) brightness(.5);transform:scale(1.2)}
.story-stage{position:relative;height:100%;display:flex;flex-direction:column;max-width:520px;margin:0 auto}
.story-progress{display:flex;gap:4px;padding:12px 12px 6px}
.story-progress div{flex:1;height:3px;background:rgba(255,255,255,.25);border-radius:2px;overflow:hidden}
.story-progress div i{display:block;height:100%;background:#fff;width:0;transition:width .1s linear}
.story-progress div.done i{width:100%}
.story-topbar{display:flex;align-items:center;gap:10px;padding:6px 14px 10px;color:#fff}
.story-topbar img{width:36px;height:36px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.4)}
.story-topbar .u{font-weight:700;font-size:14px;display:flex;align-items:center;gap:4px}
.story-topbar .t{font-size:12px;color:rgba(255,255,255,.7)}
.story-topbar .close{margin-left:auto;background:rgba(255,255,255,.15);border:0;color:#fff;width:36px;height:36px;border-radius:50%;font-size:18px;cursor:pointer}
.story-image{flex:1;display:grid;place-items:center;position:relative}
.story-image img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;animation:zoomIn .4s ease}
.story-nav{position:absolute;top:0;bottom:0;width:40%;z-index:2}
.story-nav.left{left:0}
.story-nav.right{right:0}

/* Admin */
.admin-table{width:100%;border-collapse:collapse;background:var(--surface);border-radius:14px;overflow:hidden;border:1px solid var(--border)}
.admin-table th,.admin-table td{padding:12px 14px;text-align:left;font-size:13px;border-bottom:1px solid var(--border)}
.admin-table th{background:rgba(255,255,255,.05);color:var(--muted);font-weight:700;text-transform:uppercase;font-size:11px;letter-spacing:.5px}
.admin-table tr:last-child td{border-bottom:0}
.admin-header{display:flex;justify-content:space-between;align-items:center;margin:8px 0 16px}
.admin-header h1{font-size:22px;background:var(--grad-hero);-webkit-background-clip:text;background-clip:text;color:transparent}
.tag{display:inline-block;padding:4px 8px;border-radius:8px;font-size:11px;font-weight:700}
.tag-priv{background:rgba(244,114,182,.15);color:#f9a8d4}
.tag-pub{background:rgba(34,211,238,.15);color:#a5f3fc}
.tag-adm{background:rgba(245,208,111,.2);color:#fde68a}

/* Animations */
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes zoomIn{from{transform:scale(.94);opacity:.5}to{transform:scale(1);opacity:1}}

/* Hidden SVG defs */
.svgdefs{position:absolute;width:0;height:0}

/* Utility */
.text-center{text-align:center}
.muted{color:var(--muted)}
.mt-16{margin-top:16px}
.hide{display:none!important}

@media(min-width:640px){
  .app-shell{border-left:1px solid var(--border);border-right:1px solid var(--border)}
}
