/* ==========================================================================
   NEON VOID — component styles for the reference homepage layout.
   Loaded AFTER style.css. Uses the reference's exact colors:
   bg #0C0A1D, text #F6F3FF, pink #FF3D81, yellow #FFD23F.
   ========================================================================== */

/* ---------- Base body ---------- */
body {
    background-color: #0C0A1D;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(123, 92, 255, 0.10), transparent 70%),
        radial-gradient(ellipse 60% 40% at 85% 15%, rgba(255, 61, 129, 0.06), transparent 60%);
    background-attachment: fixed;
    color: #F6F3FF;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: clip;
}

/* Keep the old token names working for non-homepage pages (series, reader) */
:root {
    --bg-void: #0C0A1D;
    --bg-base: #0C0A1D;
    --bg-surface: #17142B;
    --bg-card: #17142B;
    --bg-card-hover: #2A2644;
    --bg-input: #17142B;
    --text-pure: #F6F3FF;
    --text-primary: #F6F3FF;
    --text-secondary: #B1ADCB;
    --text-muted: #8B87A8;
    --border-subtle: #2A2644;
    --border-card: rgba(255, 61, 129, 0.2);
    --border-hover: rgba(255, 210, 63, 0.5);
    --accent-primary: #FF3D81;
    --accent-primary-hover: #FF5C9A;
    --accent-primary-rgb: 255, 61, 129;
    --accent-subtle: rgba(255, 61, 129, 0.12);
    --accent-secondary: #FFD23F;
    --accent-secondary-hover: #FFE566;
    --accent-amber-rgb: 255, 210, 63;
    --accent-secondary-subtle: rgba(255, 210, 63, 0.12);
    --accent-crimson: #FF3D81;
    --accent-crimson-hover: #FF5C9A;
    --accent-crimson-rgb: 255, 61, 129;
    --accent-crimson-subtle: rgba(255, 61, 129, 0.12);
    --accent-teal-rgb: 61, 224, 255;
    --shadow-glow: 0 0 18px rgba(255, 61, 129, 0.25);
    --shadow-crimson-glow: 0 0 22px rgba(255, 61, 129, 0.3);
    --font-display: 'Anton', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

/* ---------- Header ----------
   Asura-style: a static bar that scrolls away with the page (not sticky),
   full-bleed background edge to edge, inner content spanning ~95% of the
   viewport (max 1285px) so it is never a centred island. */
header {
    background: #0C0A1D;
    border-bottom: 1px solid #2A2644;
    position: relative;
    z-index: 1000;
    padding: 0;
}

.nv-header {
    width: 95%;
    max-width: 1285px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px 32px;
}

.nv-logo {
    font-family: var(--font-display);
    font-size: 32px;
    text-transform: uppercase;
    color: #FF3D81;
    text-decoration: none;
    line-height: 1;
}

/* Nav hugs the logo on the left (Asura-style); only the search/Status
   group is pushed to the far right. */
.nv-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-weight: 700;
    font-size: 15px;
    align-items: center;
}

.nv-nav a { text-decoration: none; color: #F6F3FF; }
.nv-nav a:hover { color: #FF3D81; }

/* 18+ entry: kept inside the nav flow but visually separated from the
   regular links so it reads as its own action, not a squeezed 6th link. */
.nv-nav .nv-18plus {
    margin-left: 8px;
    padding-left: 16px;
    border-left: 1px solid #2A2644;
}

/* Mobile-only 18+ pill lives in the search row; hidden on desktop. */
.nv-18plus-mobile { display: none; }

.nv-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nv-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #17142B;
    border-radius: 999px;
    padding: 0 16px;
    height: 44px;
    color: #B1ADCB;
}

.nv-search input {
    background: transparent;
    border: 0;
    outline: 0;
    color: #F6F3FF;
    font: inherit;
    font-size: 15px;
    width: 150px;
}

.nv-signin {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    background: #FFD23F;
    color: #0C0A1D;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}

.nv-signin:hover { color: #0C0A1D; filter: brightness(1.1); }

/* ---------- Marquee ribbon ---------- */
.nv-marquee {
    background: #FFD23F;
    color: #0C0A1D;
    padding: 16px 0;
    transform: rotate(-1.2deg);
    margin: 8px -20px 0;
    font-family: var(--font-display);
    font-size: 30px;
    text-transform: uppercase;
    overflow: hidden;
    width: calc(100% + 40px);
    position: relative;
    z-index: 1;
}

.nv-marquee-track {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    width: max-content;
    animation: nv-mq 28s linear infinite;
}

@keyframes nv-mq {
    to { transform: translateX(-50%); }
}

/* ---------- Section shell ---------- */
.nv-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nv-h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 44px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    color: #F6F3FF;
}

.nv-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.nv-section-link {
    color: #B1ADCB;
    font-size: 15px;
    text-decoration: none;
}

.nv-section-link:hover { color: #F6F3FF; }

/* ---------- Featured hero ---------- */
.nv-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 56px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nv-hero-left {
    flex: 1 1 480px;
    max-width: 640px;
}

.nv-hero-tag {
    display: inline-block;
    background: #FFD23F;
    color: #0C0A1D;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .1em;
    padding: 6px 12px;
    border-radius: 6px;
    transform: rotate(-2deg);
}

.nv-hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(56px, 8.6vw, 104px);
    line-height: .95;
    text-transform: uppercase;
    margin: 20px 0;
    color: #F6F3FF;
    overflow-wrap: break-word;
}

.nv-hero-title span { color: #FF3D81; }

.nv-hero-desc {
    margin: 0 0 28px;
    font-size: 18px;
    line-height: 1.55;
    color: #D6D2EE;
    min-height: 28px;
}

.nv-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.nv-btn-primary {
    display: inline-flex;
    align-items: center;
    height: 52px;
    padding: 0 32px;
    border-radius: 999px;
    background: #FF3D81;
    color: #0C0A1D;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
}

.nv-btn-primary:hover { color: #0C0A1D; filter: brightness(1.1); }

.nv-btn-outline {
    display: inline-flex;
    align-items: center;
    height: 52px;
    padding: 0 32px;
    border-radius: 999px;
    border: 2px solid #F6F3FF;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    color: #F6F3FF;
}

.nv-btn-outline:hover { color: #FF3D81; border-color: #FF3D81; }

.nv-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.nv-stat-num {
    font-family: var(--font-display);
    font-size: 36px;
    color: #FFD23F;
    line-height: 1;
}

.nv-stat-label {
    color: #B1ADCB;
    font-size: 13px;
    margin-top: 2px;
}

/* ---------- Hero cover stack ---------- */
.nv-hero-covers {
    flex: 0 0 auto;
    position: relative;
    width: 460px;
    max-width: 100%;
    height: 560px;
    overflow: visible;
}

.nv-cover {
    position: absolute;
    aspect-ratio: 2/3;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.nv-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nv-cover-1 { left: 0; top: 70px; width: 250px; transform: rotate(-9deg); background: #3DE0FF; }
.nv-cover-2 { right: 0; top: 20px; width: 250px; transform: rotate(8deg); background: #7B5CFF; }
.nv-cover-3 { left: 70px; top: 60px; width: 290px; transform: rotate(-2deg); background: #FF3D81; z-index: 2; }

/* ---------- Lift hover ---------- */
.nv-lift {
    display: block;
    transition: transform .2s;
    text-decoration: none;
    color: #F6F3FF;
}

.nv-lift:hover {
    transform: translateY(-8px) rotate(-1deg);
    color: #F6F3FF;
}

/* ---------- Trending rail ---------- */
.nv-trending { margin-top: 72px; }

.nv-trending-rail {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 12px 0 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.nv-trend-card { flex: 0 0 230px; scroll-snap-align: start; }

.nv-trend-cover {
    aspect-ratio: 3/4;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: #17142B;
}

.nv-trend-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nv-trend-rank {
    position: absolute;
    left: 12px;
    bottom: 4px;
    font-family: var(--font-display);
    font-size: 84px;
    line-height: 1;
    color: #0C0A1D;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    z-index: 2;
}

.nv-card-title {
    margin-top: 12px;
    font-weight: 700;
    font-size: 16px;
    color: #F6F3FF;
}

.nv-card-sub {
    color: #B1ADCB;
    font-size: 13px;
    margin-top: 2px;
}

/* ---------- Fresh chapters grid ---------- */
.nv-fresh { margin-top: 56px; }

.nv-fresh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 28px 20px;
}

.nv-fresh-cover {
    aspect-ratio: 2/3;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: #17142B;
}

.nv-fresh-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nv-new-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    background: #FFD23F;
    color: #0C0A1D;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 2;
}

/* ---------- Genre vibe tiles ---------- */
.nv-vibes { margin-top: 88px; }

.nv-vibe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.nv-vibe-tile {
    border-radius: 20px;
    min-height: 130px;
    padding: 20px;
    display: flex;
    align-items: flex-end;
    font-family: var(--font-display);
    font-size: 34px;
    text-transform: uppercase;
    text-decoration: none;
    color: #0C0A1D;
    line-height: 1;
}

.nv-vibe-tile:hover { color: #0C0A1D; filter: brightness(1.08); }

/* ---------- Footer ---------- */
.nv-footer {
    width: 95%;
    max-width: 1285px;
    margin: 72px auto 0;
    padding: 32px 0 48px;
    border-top: 1px solid #2A2644;
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    align-items: center;
    justify-content: space-between;
    color: #B1ADCB;
    font-size: 14px;
}

.nv-footer-logo {
    font-family: var(--font-display);
    font-size: 24px;
    text-transform: uppercase;
    color: #F6F3FF;
}

.nv-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.nv-footer-nav a { text-decoration: none; color: #B1ADCB; }
.nv-footer-nav a:hover { color: #F6F3FF; }

/* ---------- Series grid cards (neon restyle) ---------- */
.series-card {
    background: #17142B;
    border: 1px solid #2A2644;
    border-radius: 16px;
}

.series-card:hover {
    border-color: rgba(255, 210, 63, 0.5);
    box-shadow: 0 0 24px rgba(255, 61, 129, 0.12), 0 8px 28px rgba(0, 0, 0, 0.5);
}

.series-card-title { color: #F6F3FF; }

.series-rank-badge {
    background: rgba(12, 10, 29, 0.9);
    border: 1px solid rgba(255, 210, 63, 0.3);
    color: #FFD23F;
}

.series-card-badge {
    background: #FF3D81;
    color: #0C0A1D;
    box-shadow: none;
}

.card-mini-tag {
    background: rgba(123, 92, 255, 0.12);
    border: 1px solid rgba(123, 92, 255, 0.25);
    color: #B1ADCB;
}

/* ---------- Controls (search, chips, sort) ---------- */
.search-input {
    background: #17142B;
    border: 1px solid #2A2644;
    border-radius: 999px;
    color: #F6F3FF;
}

.search-input:focus {
    border-color: #7B5CFF;
    box-shadow: 0 0 0 4px rgba(123, 92, 255, 0.15);
    background: #1E1B38;
}

.genre-chip {
    background: #17142B;
    border: 1px solid #2A2644;
    border-radius: 999px;
    color: #B1ADCB;
}

.genre-chip:hover {
    border-color: #FFD23F;
    color: #FFD23F;
    background: #17142B;
}

.genre-chip.active {
    background: #FF3D81;
    border-color: #FF3D81;
    color: #0C0A1D;
    font-weight: 700;
    box-shadow: none;
}

.sort-select {
    background: #17142B;
    border: 1px solid #2A2644;
    border-radius: 999px;
    color: #F6F3FF;
}

.sort-select:focus { border-color: #7B5CFF; }

.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 400;
    text-transform: uppercase;
    color: #F6F3FF;
}

/* ---------- Continue reading ---------- */
.continue-card {
    background: #17142B;
    border: 1px solid #2A2644;
    border-radius: 12px;
}

.continue-card::before {
    background: #FF3D81;
}

.continue-card:hover {
    border-color: rgba(255, 61, 129, 0.5);
    box-shadow: 0 0 20px rgba(255, 61, 129, 0.1);
}

.continue-chapter { color: #FFD23F; }

.continue-resume-btn {
    background: rgba(255, 210, 63, 0.15);
    border: 1px solid rgba(255, 210, 63, 0.35);
    color: #FFD23F;
}

/* ---------- Reading progress ---------- */
.reading-progress-bar {
    background: linear-gradient(90deg, #7B5CFF, #FF3D81, #FFD23F);
    box-shadow: 0 0 10px rgba(255, 61, 129, 0.5);
}

/* ---------- Pagination ---------- */
.pag-num.active {
    background: #FF3D81;
    color: #0C0A1D;
    border-color: #FF3D81;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar-thumb { background: #2A2644; }
::-webkit-scrollbar-thumb:hover { background: #7B5CFF; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nv-header { gap: 12px 20px; }
    .nv-nav { gap: 6px 16px; }
    .nv-hero { gap: 24px; }
    .nv-hero-covers { width: 400px; height: 480px; }
    .nv-cover-1, .nv-cover-2 { width: 210px; }
    .nv-cover-3 { width: 250px; }
}

/* Below the 95%-inner's comfort floor the nav needs tighter tracking and
   smaller gaps so the logo/nav/search row still fits on one line. */
@media (max-width: 760px) {
    .nv-header { padding: 14px 0; gap: 10px 14px; }
    .nv-logo { font-size: 26px; }
    .nv-nav { gap: 4px 12px; font-size: 13px; }
    .nv-nav .nv-18plus { padding-left: 10px; margin-left: 4px; }
    .nv-search { height: 40px; }
    .nv-search input { width: 100px; font-size: 13px; }
    .nv-signin { height: 40px; padding: 0 16px; font-size: 13px; }
}

@media (max-width: 900px) {
    .nv-hero-title { font-size: clamp(44px, 11vw, 72px); }
    .nv-hero-covers { width: 100%; height: 420px; }
    .nv-cover-1 { width: 180px; }
    .nv-cover-2 { width: 180px; }
    .nv-cover-3 { width: 220px; left: 50%; transform: translateX(-50%) rotate(-2deg); }
    .nv-h2 { font-size: 32px; }
    .nv-search input { width: 100px; }
    .nv-trend-card { flex: 0 0 190px; }
    .nv-fresh-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 24px 16px; }
    .nv-vibe-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

@media (max-width: 640px) {
    .nv-header { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 0; }
    .nv-nav { flex-wrap: wrap; gap: 8px 14px; font-size: 14px; }
    /* On phones the five nav links fill the full width, so the 18+ entry
       moves beside the search box instead of wrapping to an orphan row. */
    .nv-nav .nv-18plus { display: none; }
    .nv-header-right { margin-left: 0; width: 100%; }
    .nv-search { flex: 1; }
    .nv-search input { width: 100%; }
    .nv-header-right .nv-18plus {
        display: inline-flex;
        align-items: center;
        height: 44px;
        padding: 0 14px;
        border-radius: 999px;
        border: 1px solid #FF3D81;
        color: #FF3D81;
        font-weight: 700;
        font-size: 14px;
        text-decoration: none;
        white-space: nowrap;
    }
    .nv-hero { padding: 16px 16px 32px; }
    .nv-hero-title { font-size: clamp(40px, 12vw, 56px); }
    .nv-hero-desc { font-size: 16px; }
    .nv-hero-stats { gap: 20px; }
    .nv-stat-num { font-size: 28px; }
    .nv-section { padding: 0 16px; }
    /* No rotated bleed on phones: the -20px margins + rotation widen the
       page and cause horizontal scrolling. */
    .nv-marquee { transform: none; margin: 8px 0 0; width: 100%; font-size: 22px; }
    /* Full-bleed bar on phones too: drop the 95% gutter so the logo sits
       flush with the page edge like Asura's mobile bar. */
    .nv-header { width: 100%; padding-left: 16px; padding-right: 16px; }
    .nv-trend-card { flex: 0 0 150px; }
    .nv-trend-rank { font-size: 60px; }
    .nv-fresh-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 20px 12px; }
    .nv-vibe-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
    .nv-vibe-tile { min-height: 100px; font-size: 24px; }
    .nv-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
    .nv-footer-nav { gap: 6px 14px; font-size: 13px; }
    /* series grid: keep 2 columns on phones, roomy cards */
    .series-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .series-card-title { font-size: 14px; }
    .series-card-meta { font-size: 12px; }
    .home-controls { padding: 0 16px; }
    .chapter-grid { grid-template-columns: 1fr; }
}

