/* ============================================================
   NeoPolymarket — Author / User Profile CSS
   Place at: neopolymarket/assets/css/author.css
   ============================================================ */

:root {
    --bg:#080B10; --bg2:#0F1319; --bg3:#161C26; --card:#111722;
    --border:rgba(255,255,255,.07); --border2:rgba(255,255,255,.13);
    --gold:#F0B429; --gold2:#FFD97D; --green:#0ECB81; --red:#F6465D;
    --blue2:#4D9FFF;
    --text:#E8ECF4; --text2:#A0AAB8; --text3:#606878;
    --font-display:'Fraunces',Georgia,serif;
    --font-body:'Syne',sans-serif;
    --font-mono:'IBM Plex Mono',monospace;
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
body { background:var(--bg); color:var(--text); font-family:var(--font-body);
       font-size:15px; line-height:1.65; overflow-x:hidden; }
body::after { content:''; position:fixed; inset:0; z-index:9999; pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E"); opacity:.5; }
::-webkit-scrollbar { width:5px; }
::-webkit-scrollbar-track { background:var(--bg); }
::-webkit-scrollbar-thumb { background:var(--gold); border-radius:3px; }

/* ── HERO ── */
.author-hero {
    background:var(--bg2); border-bottom:1px solid var(--border);
    position:relative; overflow:hidden;
}
.author-hero::before {
    content:''; position:absolute; inset:0; pointer-events:none;
    background-image:
        linear-gradient(rgba(14,203,129,.025) 1px,transparent 1px),
        linear-gradient(90deg,rgba(14,203,129,.025) 1px,transparent 1px);
    background-size:48px 48px;
}
.author-hero-inner {
    position:relative; z-index:1; max-width:1100px; margin:0 auto;
    padding:40px 24px; display:flex; align-items:flex-start;
    gap:24px; flex-wrap:wrap;
}
.author-avatar-wrap { position:relative; flex-shrink:0; }
.author-avatar {
    width:90px; height:90px; border-radius:50%;
    background:rgba(240,180,41,.1); border:3px solid rgba(240,180,41,.3);
    display:flex; align-items:center; justify-content:center; font-size:44px;
}
.author-role-badge {
    position:absolute; bottom:-4px; left:50%; transform:translateX(-50%);
    display:inline-flex; align-items:center; gap:4px;
    font-size:10px; font-weight:700; padding:2px 8px; border-radius:100px;
    white-space:nowrap; font-family:var(--font-mono); letter-spacing:1px;
}
.role-admin  { background:rgba(246,70,93,.15); border:1px solid rgba(246,70,93,.3); color:var(--red); }
.role-editor { background:rgba(77,159,255,.15); border:1px solid rgba(77,159,255,.3); color:var(--blue2); }

.author-info { flex:1; min-width:0; }
.author-name { font-family:var(--font-display); font-size:32px; font-weight:900; letter-spacing:-.5px; margin-bottom:10px; }

.author-meta-row {
    display:flex; align-items:center; gap:16px; flex-wrap:wrap;
    font-size:13px; color:var(--text3); margin-bottom:20px;
}
.author-meta-row span { display:flex; align-items:center; gap:5px; }

.author-stats-row { display:flex; justify-content:center; gap:32px; flex-wrap:wrap; padding:20px 0; }
.asr-item { display:flex; flex-direction:column; align-items:center; text-align:center; padding-right:32px; border-right:1px solid rgba(255,255,255,0.07); }
.asr-item:last-child { padding-right:0; border-right:none; }
.asr-val   { font-family:var(--font-display); font-size:26px; font-weight:900; line-height:1; margin-bottom:4px; }
.asr-label { font-size:11px; color:var(--text3); font-family:var(--font-mono); letter-spacing:0.8px; text-transform:uppercase; }
@media(max-width:480px){.author-stats-row{gap:20px;}.asr-item{padding-right:20px;border-right:none;}}

.author-actions { display:flex; flex-direction:column; gap:8px; flex-shrink:0; align-self:center; }
.btn-edit-profile, .btn-wallet {
    display:inline-flex; align-items:center; gap:7px;
    padding:10px 18px; border-radius:10px; font-size:13px; font-weight:700;
    text-decoration:none; transition:all .2s; cursor:pointer; border:none;
    font-family:var(--font-body);
}
.btn-edit-profile { background:var(--gold); color:#000; }
.btn-edit-profile:hover { background:var(--gold2); transform:translateY(-2px); }
.btn-wallet { background:rgba(255,255,255,.06); color:var(--text2); border:1px solid var(--border2); }
.btn-wallet:hover { border-color:var(--gold); color:var(--gold); }

/* ── PAGE BODY ── */
.author-body {
    max-width:1100px; margin:0 auto;
    padding:28px 24px 80px;
    display:grid; grid-template-columns:1fr 280px;
    gap:24px; align-items:start;
}
.author-main    { display:flex; flex-direction:column; gap:20px; }
.author-sidebar { display:flex; flex-direction:column; gap:16px; }

/* ── PANELS ── */
.author-panel {
    background:var(--card); border:1px solid var(--border);
    border-radius:16px; overflow:hidden;
}
.ap-head {
    padding:14px 20px; border-bottom:1px solid var(--border);
    display:flex; align-items:center; gap:10px;
}
.ap-title { font-size:14px; font-weight:700; display:flex; align-items:center; gap:8px; flex:1; }
.ap-count {
    background:rgba(255,255,255,.07); border:1px solid var(--border);
    border-radius:100px; padding:2px 9px; font-family:var(--font-mono);
    font-size:11px; color:var(--text3);
}
.ap-body { padding:16px 20px; display:flex; flex-direction:column; gap:10px; }

/* ── POSITION ROWS ── */
.position-row {
    padding:10px 0; border-bottom:1px solid var(--border);
    display:flex; flex-direction:column; gap:6px;
}
.position-row:last-child { border-bottom:none; }
.pos-question {
    font-size:13px; font-weight:600; color:var(--text); text-decoration:none;
    display:flex; align-items:flex-start; gap:8px; line-height:1.4;
}
.pos-question:hover { color:var(--gold); }
.cat-dot { width:7px; height:7px; border-radius:50%; flex-shrink:0; margin-top:4px; }
.pos-details { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding-left:15px; }
.pos-side {
    display:inline-block; font-size:10px; font-weight:700; padding:2px 8px;
    border-radius:4px; font-family:var(--font-mono); letter-spacing:1px;
}
.pos-shares,.pos-cost { font-size:12px; }
.pos-value { font-family:var(--font-mono); font-size:13px; font-weight:700; color:var(--text); }

/* ── TRADE ROWS ── */
.trade-row {
    display:flex; align-items:center; gap:12px; padding:12px 20px;
    border-bottom:1px solid var(--border);
}
.trade-row:last-child { border-bottom:none; }
.tr-icon {
    width:36px; height:36px; border-radius:10px; flex-shrink:0;
    display:flex; align-items:center; justify-content:center; font-size:16px;
}
.tr-info { flex:1; min-width:0; }
.tr-action { font-size:13px; font-weight:700; margin-bottom:2px; }
.tr-market { font-size:12px; color:var(--text3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tr-right { text-align:right; flex-shrink:0; }
.tr-amount { font-family:var(--font-mono); font-size:13px; font-weight:700; }
.tr-time   { font-size:11px; color:var(--text3); margin-top:2px; }

/* ── CREATED MARKETS GRID ── */
.ap-grid {
    display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:16px;
}
.created-market-card {
    background:var(--bg2); border:1px solid var(--border); border-radius:12px;
    padding:14px; text-decoration:none; color:var(--text);
    transition:border-color .2s; display:flex; flex-direction:column; gap:6px;
}
.created-market-card:hover { border-color:var(--gold); }
.cmc-cat  { font-size:11px; font-weight:700; }
.cmc-q    { font-size:13px; font-weight:600; line-height:1.4; }
.cmc-stats { display:flex; gap:10px; font-size:11px; color:var(--text3); font-family:var(--font-mono); flex-wrap:wrap; }

/* ── EMPTY STATE ── */
.author-empty { text-align:center; padding:60px 24px; color:var(--text3); }
.ae-icon { font-size:48px; display:block; margin-bottom:16px; }
.author-empty h3 { font-family:var(--font-display); font-size:20px; font-weight:700; color:var(--text2); margin-bottom:8px; }
.author-empty p  { font-size:14px; margin-bottom:20px; }
.btn-ae {
    display:inline-flex; align-items:center; gap:7px;
    background:var(--gold); color:#000; font-weight:700; font-size:13px;
    padding:10px 20px; border-radius:9px; text-decoration:none; transition:all .2s;
}
.btn-ae:hover { background:var(--gold2); }

/* ── SIDEBAR CARDS ── */
.author-side-card {
    background:var(--card); border:1px solid var(--border); border-radius:14px; padding:18px;
}
.asc-title {
    font-family:var(--font-mono); font-size:10px; letter-spacing:2px;
    text-transform:uppercase; color:var(--text3); margin-bottom:14px;
}
.asc-row {
    display:flex; justify-content:space-between; align-items:center;
    padding:8px 0; border-bottom:1px solid var(--border); font-size:13px;
    color:var(--text2);
}
.asc-row:last-child { border-bottom:none; }
.asc-row strong { color:var(--text); font-weight:700; font-family:var(--font-mono); }

.perf-stat { margin-bottom:16px; }
.ps-label  { font-size:12px; color:var(--text3); margin-bottom:6px; display:flex; justify-content:space-between; }
.ps-bar-wrap { width:100%; height:6px; border-radius:3px; background:rgba(255,255,255,.07); overflow:hidden; margin-bottom:4px; }
.ps-bar-fill { height:100%; border-radius:3px; transition:width .8s ease; }
.ps-val  { font-family:var(--font-mono); font-size:13px; font-weight:700; }

.ref-code-display {
    display:flex; align-items:center; gap:8px;
    background:rgba(240,180,41,.07); border:1px solid rgba(240,180,41,.2);
    border-radius:10px; padding:12px 14px;
    font-family:var(--font-mono); font-size:20px; font-weight:700; color:var(--gold);
    letter-spacing:3px;
}
.btn-copy-ref {
    background:none; border:none; cursor:pointer; color:var(--text3);
    font-size:16px; margin-left:auto; transition:color .2s; padding:0;
}
.btn-copy-ref:hover { color:var(--gold); }

@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.fade-up { animation:fadeUp .4s ease both; }

@media(max-width:860px) {
    .author-body { grid-template-columns:1fr; }
    .ap-grid     { grid-template-columns:1fr; }
}
@media(max-width:540px) {
    .author-hero-inner { flex-direction:column; align-items:center; text-align:center; }
    .author-meta-row   { justify-content:center; }
    .author-stats-row  { justify-content:center; }
    .author-actions    { flex-direction:row; }
    .author-body       { padding:20px 16px 60px; }
}
