:root{
    --bg:#071018;
    --bg-2:#0b1622;
    --surface:rgba(255,255,255,.06);
    --surface-2:rgba(255,255,255,.09);
    --stroke:rgba(255,255,255,.10);
    --text:#eef5ff;
    --muted:#99a9c2;
    --primary:#7c5cff;
    --primary-2:#9f88ff;
    --accent:#38d8ff;
    --success:#3ddc97;
    --warning:#f5c451;
    --shadow:0 20px 60px rgba(0,0,0,.35);
    --radius:22px;
    --radius-sm:16px;
    --container:1200px;
}

/* RESET */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:Inter, Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(124,92,255,.15), transparent 28%),
        radial-gradient(circle at bottom right, rgba(56,216,255,.09), transparent 25%),
        linear-gradient(180deg, #061018 0%, #09131d 100%);
    color:var(--text);
    min-height:100vh;
    overflow-x:hidden;
    position:relative;
}

a{
    color:inherit;
    text-decoration:none;
}

button,
input,
select,
textarea{
    font:inherit;
}

img{
    max-width:100%;
    height:auto;
    display:block;
}

.container{
    width:min(var(--container), calc(100% - 32px));
    margin:0 auto;
}

/* FUNDO / EFEITOS */
.noise{
    position:fixed;
    inset:0;
    pointer-events:none;
    opacity:.06;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size:4px 4px, 4px 4px;
    mix-blend-mode:soft-light;
    z-index:0;
}

.bg-gradient{
    position:fixed;
    border-radius:999px;
    filter:blur(90px);
    opacity:.35;
    pointer-events:none;
    z-index:0;
}

.bg-gradient-1{
    width:380px;
    height:380px;
    top:80px;
    left:-100px;
    background:rgba(124,92,255,.45);
}

.bg-gradient-2{
    width:420px;
    height:420px;
    right:-120px;
    bottom:120px;
    background:rgba(56,216,255,.18);
}

.topbar,
.hero,
.section,
.footer{
    position:relative;
    z-index:1;
}

/* COMPONENTES BASE */
.glass-panel{
    background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    border:1px solid rgba(255,255,255,.10);
    border-radius:var(--radius);
    box-shadow:var(--shadow);
    backdrop-filter:blur(18px);
    min-width:0;
    transition:.3s ease;
}

.glass-panel:hover{
    transform:translateY(-3px);
}

.btn{
    border:none;
    border-radius:14px;
    padding:12px 18px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    transition:.25s ease;
    cursor:pointer;
    font-weight:600;
    text-align:center;
}

.btn:hover{
    transform:translateY(-1px);
}

.btn-primary{
    background:linear-gradient(135deg, var(--primary), var(--primary-2));
    color:#fff;
    box-shadow:0 18px 36px rgba(124,92,255,.28);
}

.btn-ghost{
    background:rgba(255,255,255,.05);
    color:#fff;
    border:1px solid rgba(255,255,255,.08);
}

.btn-dark{
    background:rgba(255,255,255,.07);
    color:#fff;
    border:1px solid rgba(255,255,255,.08);
}

.btn-lg{
    padding:15px 24px;
    border-radius:16px;
}

.eyebrow,
.section-tag,
.label,
.profile-badge,
.panel-badge,
.shelf-label,
.launch-editor{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
    border-radius:999px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
    color:#c8d6ec;
    font-size:12px;
    width:max-content;
    max-width:100%;
}

/* TOPO */
.topbar{
    position:sticky;
    top:0;
    backdrop-filter:blur(20px);
    background:rgba(5,10,18,.55);
    border-bottom:1px solid rgba(255,255,255,.06);
    z-index:50;
}

.topbar-wrap{
    min-height:82px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    position:relative;
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.brand-mark{
    width:46px;
    height:46px;
    border-radius:14px;
    display:grid;
    place-items:center;
    font-weight:800;
    font-size:20px;
    color:#fff;
    background:linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow:0 14px 30px rgba(124,92,255,.35);
    flex:0 0 auto;
}

.brand-text{
    display:flex;
    flex-direction:column;
    line-height:1.05;
    min-width:0;
}

.brand-text strong{
    font-size:18px;
}

.brand-text span{
    color:var(--muted);
    font-size:12px;
}

.main-nav{
    display:flex;
    align-items:center;
    gap:22px;
}

.main-nav a{
    color:#d8e3f5;
    font-size:14px;
    transition:.25s ease;
    position:relative;
}

.main-nav a:hover,
.main-nav a.active-link{
    color:#fff;
}

.topbar-actions{
    display:flex;
    align-items:center;
    gap:12px;
    flex:0 0 auto;
}

.menu-toggle{
    display:none;
    width:44px;
    height:44px;
    border:none;
    border-radius:14px;
    background:rgba(255,255,255,.08);
    color:#fff;
    cursor:pointer;
}

/* HERO */
.hero{
    padding:80px 0 40px;
}

.hero-grid{
    display:grid;
    grid-template-columns:minmax(0, 1.12fr) minmax(0, .88fr);
    gap:34px;
    align-items:center;
}

.hero-left,
.hero-right{
    min-width:0;
}

.hero h1{
    margin-top:18px;
    font-size:clamp(38px, 6vw, 72px);
    line-height:.98;
    letter-spacing:-.03em;
    max-width:780px;
}

.hero h1 span{
    background:linear-gradient(135deg, #fff, #c4beff 55%, #87e8ff);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
    background-clip:text;
}

.hero-text{
    margin-top:20px;
    max-width:670px;
    color:var(--muted);
    font-size:18px;
    line-height:1.7;
}

.hero-actions{
    margin-top:28px;
    display:flex;
    align-items:center;
    gap:14px;
    flex-wrap:wrap;
}

.hero-metrics{
    margin-top:30px;
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:14px;
}

.metric-card{
    padding:18px;
    border-radius:20px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.07);
    box-shadow:var(--shadow);
    min-width:0;
}

.metric-card strong{
    display:block;
    font-size:24px;
    margin-bottom:6px;
}

.metric-card span{
    color:var(--muted);
    font-size:14px;
    line-height:1.5;
}

/* SHOWCASE */
.showcase-card{
    padding:28px;
    position:relative;
    overflow:hidden;
}

.showcase-card::before{
    content:"";
    position:absolute;
    inset:0;
    background:radial-gradient(circle at top right, rgba(124,92,255,.22), transparent 40%);
    pointer-events:none;
}

.showcase-top{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
}

.showcase-top h3{
    margin-top:8px;
    font-size:28px;
}

.status-dot{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#d7f8e7;
    font-size:12px;
    background:rgba(61,220,151,.12);
    border:1px solid rgba(61,220,151,.25);
    border-radius:999px;
    padding:8px 12px;
    white-space:nowrap;
}

.status-dot::before{
    content:"";
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--success);
    box-shadow:0 0 0 6px rgba(61,220,151,.10);
}

.profile-mini{
    margin-top:26px;
    display:flex;
    align-items:center;
    gap:18px;
    flex-wrap:wrap;
}

.avatar-ring{
    width:92px;
    height:92px;
    padding:3px;
    border-radius:50%;
    background:linear-gradient(135deg, var(--primary), var(--accent));
    flex:0 0 auto;
}

.avatar{
    width:100%;
    height:100%;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:#0b1420;
    font-size:28px;
    font-weight:800;
}

.profile-info{
    min-width:0;
}

.profile-info p{
    color:var(--muted);
    margin-top:6px;
    font-size:14px;
}

.reading-progress{
    margin-top:24px;
    padding:18px;
    border-radius:20px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
}

.progress-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:12px;
    color:#dce7f6;
    gap:12px;
    flex-wrap:wrap;
}

.progress-bar{
    width:100%;
    height:12px;
    background:rgba(255,255,255,.07);
    border-radius:999px;
    overflow:hidden;
}

.progress-fill{
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg, var(--primary), var(--accent));
    box-shadow:0 0 20px rgba(124,92,255,.35);
}

.progress-book{
    margin-top:12px;
    display:flex;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
}

.progress-book span{
    color:var(--muted);
    font-size:14px;
}

.mini-grid{
    margin-top:20px;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}

.mini-box{
    padding:16px;
    border-radius:18px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    min-width:0;
}

.mini-box span{
    display:block;
    color:var(--muted);
    font-size:13px;
    margin-bottom:6px;
}

.mini-box strong{
    font-size:22px;
}

/* SEÇÕES */
.section{
    padding:44px 0;
}

.section-head{
    margin-bottom:24px;
}

.section-head h2{
    margin-top:12px;
    font-size:clamp(28px, 4vw, 46px);
    letter-spacing:-.03em;
}

.section-head p{
    margin-top:12px;
    color:var(--muted);
    max-width:720px;
    line-height:1.7;
}

/* FEATURES */
.feature-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:18px;
}

.feature-card{
    padding:24px;
    border-radius:24px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    box-shadow:var(--shadow);
    transition:.25s ease;
    min-width:0;
}

.feature-card:hover{
    transform:translateY(-4px);
    border-color:rgba(124,92,255,.35);
}

.feature-icon{
    width:54px;
    height:54px;
    border-radius:16px;
    display:grid;
    place-items:center;
    font-size:24px;
    background:linear-gradient(135deg, rgba(124,92,255,.18), rgba(56,216,255,.16));
    margin-bottom:18px;
}

.feature-card h3{
    font-size:22px;
    margin-bottom:10px;
}

.feature-card p{
    color:var(--muted);
    line-height:1.7;
}

/* RANKING */
.ranking-layout{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 320px;
    gap:18px;
}

.ranking-main{
    padding:24px;
}

.panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:18px;
    flex-wrap:wrap;
}

.ranking-list{
    display:grid;
    gap:14px;
}

.ranking-item{
    display:flex;
    align-items:center;
    gap:16px;
    padding:16px;
    border-radius:18px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.07);
    min-width:0;
}

.ranking-item.active{
    border-color:rgba(124,92,255,.36);
    background:rgba(124,92,255,.10);
}

.ranking-pos{
    width:54px;
    height:54px;
    border-radius:16px;
    display:grid;
    place-items:center;
    font-weight:800;
    background:rgba(255,255,255,.06);
    flex:0 0 auto;
}

.ranking-user{
    flex:1;
    min-width:0;
}

.ranking-user strong{
    display:block;
    word-break:break-word;
}

.ranking-user span{
    display:block;
    margin-top:4px;
    color:var(--muted);
    font-size:14px;
}

.ranking-tag{
    padding:8px 12px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.09);
    background:rgba(255,255,255,.06);
    font-size:12px;
    white-space:nowrap;
}

.ranking-tag.gold{
    color:#ffe48a;
}

.ranking-tag.silver{
    color:#dce3ef;
}

.ranking-tag.bronze{
    color:#f0c18a;
}

.ranking-side{
    display:grid;
    gap:18px;
}

.side-card{
    padding:22px;
}

.side-card strong{
    display:block;
    font-size:24px;
    margin:10px 0 8px;
}

.side-card p{
    color:var(--muted);
    line-height:1.6;
}

/* SHELF */
.shelf-grid{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:18px;
}

.shelf-card{
    padding:24px;
}

.shelf-card strong{
    display:block;
    font-size:30px;
    margin:14px 0 8px;
}

.shelf-card p{
    color:var(--muted);
    line-height:1.7;
}

/* LANÇAMENTOS */
.launch-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:18px;
}

.launch-card{
    padding:18px;
    min-width:0;
}

.cover-sim{
    width:100%;
    aspect-ratio:5/6.8;
    border-radius:22px;
    margin-bottom:16px;
    border:1px solid rgba(255,255,255,.10);
    box-shadow:var(--shadow);
}

.cover-a{
    background:
        linear-gradient(135deg, rgba(0,0,0,.1), rgba(0,0,0,.3)),
        linear-gradient(135deg, #7c5cff, #2e7dff, #38d8ff);
}

.cover-b{
    background:
        linear-gradient(135deg, rgba(0,0,0,.2), rgba(0,0,0,.1)),
        linear-gradient(135deg, #111827, #374151, #7c5cff);
}

.cover-c{
    background:
        linear-gradient(135deg, rgba(0,0,0,.15), rgba(0,0,0,.2)),
        linear-gradient(135deg, #ff8aa5, #ffbf69, #ffd166);
}

.launch-info h3{
    margin:10px 0 8px;
    font-size:22px;
}

.launch-info p{
    color:var(--muted);
}

/* SOCIAL / FEED */
.social-layout{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 360px;
    gap:18px;
}

.feed-card,
.notify-card,
.cta-panel{
    padding:24px;
}

.feed-top{
    display:flex;
    align-items:center;
    gap:14px;
    min-width:0;
}

.feed-avatar{
    width:52px;
    height:52px;
    border-radius:16px;
    display:grid;
    place-items:center;
    font-weight:800;
    background:linear-gradient(135deg, var(--primary), var(--accent));
    flex:0 0 auto;
}

.feed-top div{
    min-width:0;
}

.feed-top strong{
    display:block;
}

.feed-top span{
    display:block;
    margin-top:4px;
    color:var(--muted);
    font-size:14px;
}

.feed-text{
    margin-top:18px;
    color:#dce6f5;
    line-height:1.8;
}

.feed-actions{
    margin-top:18px;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.action-btn{
    background:rgba(255,255,255,.06);
    color:#fff;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    padding:10px 14px;
    cursor:pointer;
}

.notify-card h3{
    margin-bottom:16px;
    font-size:24px;
}

.notify-list{
    list-style:none;
    display:grid;
    gap:12px;
}

.notify-list li{
    padding:14px 16px;
    border-radius:16px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    color:#d8e4f6;
    line-height:1.6;
}

/* CTA */
.cta-panel{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.cta-content{
    min-width:0;
}

.cta-content h2{
    margin-top:12px;
    font-size:clamp(28px, 4vw, 44px);
}

.cta-content p{
    margin-top:12px;
    max-width:720px;
    color:var(--muted);
    line-height:1.8;
}

.cta-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    flex:0 0 auto;
}

/* FOOTER */
.footer{
    padding:40px 0 60px;
}

.footer-wrap{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
    padding-top:20px;
    border-top:1px solid rgba(255,255,255,.08);
}

.footer p{
    margin-top:10px;
    color:var(--muted);
    max-width:420px;
}

.footer-links{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}

.footer-links a{
    color:#d8e4f6;
}

/* REVEAL */
.reveal{
    opacity:0;
    transform:translateY(20px);
    transition:opacity .8s ease, transform .8s ease;
}

.reveal.visible{
    opacity:1;
    transform:translateY(0);
}

/* BOOKS / BIBLIOTECA */
.book-card{
    width:70px;
    height:100px;
    border-radius:10px;
    background:linear-gradient(180deg,#8a6cff,#4530a2);
    box-shadow:0 10px 20px rgba(0,0,0,.3);
}

.books-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(90px, 1fr));
    gap:12px;
    margin-top:16px;
}

.book{
    border-radius:12px;
    overflow:hidden;
    position:relative;
    cursor:pointer;
    transition:.2s ease;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
}

.book img{
    width:100%;
    height:130px;
    object-fit:cover;
    display:block;
}

.book:hover{
    transform:translateY(-3px) scale(1.03);
}

/* APP / PAINEL */
.app-layout{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:220px;
    background:rgba(255,255,255,.02);
    border-right:1px solid rgba(255,255,255,.06);
    padding:20px;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.logo{
    font-weight:600;
    font-size:18px;
}

.nav-item{
    background:none;
    border:none;
    color:#ccc;
    text-align:left;
    padding:10px;
    border-radius:8px;
    cursor:pointer;
    transition:.2s ease;
}

.nav-item:hover{
    background:rgba(255,255,255,.05);
}

.nav-item.active{
    background:linear-gradient(90deg,#8a6cff,#48d0ff);
    color:#fff;
}

.logout{
    margin-top:auto;
    color:#ff6b81;
}

.main-content{
    flex:1;
    padding:30px;
}

.page{
    display:none;
}

.page.active{
    display:block;
}

/* MENU MOBILE FIXO */
.mobile-nav{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    background:#0b0f18;
    border-top:1px solid rgba(255,255,255,.05);
    display:flex;
    justify-content:space-around;
    padding:10px 0;
    z-index:999;
}

.mobile-nav button{
    background:none;
    border:none;
    color:#aaa;
    font-size:12px;
    display:flex;
    flex-direction:column;
    align-items:center;
    cursor:pointer;
}

.mobile-nav button span{
    font-size:10px;
    margin-top:4px;
}

/* TABLET */
@media (max-width: 1100px){
    .hero{
        padding:64px 0 34px;
    }

    .hero-grid,
    .ranking-layout,
    .social-layout,
    .cta-panel{
        grid-template-columns:1fr;
    }

    .hero-right{
        order:-1;
    }

    .feature-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    .shelf-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    .launch-grid{
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    .cta-actions{
        width:100%;
    }
}

/* TABLET / MENU MOBILE */
@media (max-width: 860px){
    .topbar-wrap{
        min-height:74px;
    }

    .main-nav{
        position:absolute;
        top:calc(100% + 10px);
        left:0;
        right:0;
        display:none;
        flex-direction:column;
        align-items:stretch;
        gap:8px;
        padding:16px;
        border-radius:20px;
        background:rgba(5,10,18,.96);
        border:1px solid rgba(255,255,255,.08);
        box-shadow:var(--shadow);
    }

    .main-nav.open{
        display:flex;
    }

    .main-nav a{
        width:100%;
        padding:12px 14px;
        border-radius:12px;
        background:rgba(255,255,255,.03);
    }

    .main-nav a:hover,
    .main-nav a.active-link{
        background:rgba(124,92,255,.12);
    }

    .menu-toggle{
        display:inline-grid;
        place-items:center;
    }

    .topbar-actions .btn-ghost,
    .topbar-actions .btn-primary{
        display:none;
    }

    .hero h1{
        font-size:clamp(34px, 8vw, 54px);
    }

    .hero-text{
        font-size:16px;
    }

    .hero-metrics{
        grid-template-columns:1fr;
    }

    .mini-grid,
    .launch-grid{
        grid-template-columns:1fr;
    }

    .app-layout{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        border-right:none;
        border-bottom:1px solid rgba(255,255,255,.06);
    }

    .main-content{
        padding:20px;
    }
}

/* MOBILE */
@media (max-width: 640px){
    .container{
        width:min(var(--container), calc(100% - 22px));
    }

    .brand-text span{
        display:none;
    }

    .hero{
        padding:44px 0 24px;
    }

    .hero-actions{
        flex-direction:column;
        align-items:stretch;
    }

    .hero-actions .btn{
        width:100%;
    }

    .showcase-card,
    .ranking-main,
    .feed-card,
    .notify-card,
    .cta-panel,
    .side-card,
    .shelf-card,
    .launch-card,
    .feature-card{
        padding:18px;
    }

    .showcase-top h3{
        font-size:22px;
    }

    .profile-mini{
        align-items:flex-start;
    }

    .avatar-ring{
        width:78px;
        height:78px;
    }

    .avatar{
        font-size:22px;
    }

    .feature-grid,
    .shelf-grid,
    .books-grid{
        grid-template-columns:1fr;
    }

    .ranking-item{
        align-items:flex-start;
        flex-wrap:wrap;
    }

    .ranking-tag{
        margin-left:70px;
    }

    .feed-actions{
        flex-direction:column;
        align-items:stretch;
    }

    .action-btn{
        width:100%;
    }

    .cta-actions{
        flex-direction:column;
        align-items:stretch;
        width:100%;
    }

    .cta-actions .btn{
        width:100%;
    }

    .footer-wrap{
        flex-direction:column;
        align-items:flex-start;
    }

    .container,
    .main-content{
        padding-left:16px;
        padding-right:16px;
    }

    body{
        padding-bottom:70px;
    }

    .glass-panel{
        padding:16px !important;
    }
}

/* MOBILE PEQUENO */
@media (max-width: 420px){
    .hero h1{
        font-size:30px;
    }

    .section-head h2,
    .cta-content h2{
        font-size:26px;
    }

    .metric-card strong,
    .mini-box strong,
    .side-card strong,
    .shelf-card strong{
        font-size:22px;
    }

    .ranking-pos{
        width:46px;
        height:46px;
        border-radius:14px;
    }

    .ranking-tag{
        margin-left:62px;
    }
}