/* ==============================================================================
   SRISHTY PLATFORM DESIGN SYSTEM
   "Your Stories, Amplified."
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300;1,400&display=swap');

:root {
    /* Brand Palette */
    --purple: #5B3FD4;
    --purple-light: #795cf0;
    --purple-dark: #4329b8;
    --purple-glow: rgba(91, 63, 212, 0.35);
    
    --teal: #14B8A6;
    --teal-light: #2dd4bf;
    --teal-glow: rgba(20, 184, 166, 0.3);
    
    --gold: #D4AF37;
    --gold-light: #f3cf65;
    --gold-glow: rgba(212, 175, 55, 0.25);
    
    --white: #FAFAFA;
    --white-soft: #F3F4F6;
    
    /* Dark Surface Theme */
    --bg-base: #0B0A14;
    --bg-surface: #121024;
    --bg-card: rgba(23, 21, 42, 0.75);
    --bg-card-hover: rgba(32, 29, 60, 0.85);
    --bg-glass: rgba(18, 16, 36, 0.72);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --border-highlight: rgba(91, 63, 212, 0.5);
    
    /* Text Hierarchy */
    --text-main: #FAFAFA;
    --text-muted: #9CA3AF;
    --text-dim: #6B7280;
    
    /* Reader Themes */
    --reader-dark-bg: #0F0F1E;
    --reader-dark-text: #FAFAFA;
    --reader-light-bg: #FAFAFA;
    --reader-light-text: #18181B;
    --reader-sepia-bg: #F5EEDB;
    --reader-sepia-text: #38291A;

    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    
    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Merriweather', Georgia, serif;
    
    /* Layout */
    --sidebar-width: 260px;
    --navbar-height: 74px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--white);
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.glass-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

/* Glow effects */
.glow-purple {
    box-shadow: 0 0 35px var(--purple-glow);
}

.glow-teal {
    box-shadow: 0 0 30px var(--teal-glow);
}

/* Container */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==============================================================================
   BUTTONS & BADGES
   ============================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple) 0%, var(--purple-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 18px var(--purple-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--purple-light) 0%, #8c73ff 100%);
    box-shadow: 0 6px 24px rgba(91, 63, 212, 0.5);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-teal {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
    color: #072a27;
    font-weight: 700;
    box-shadow: 0 4px 16px var(--teal-glow);
}

.btn-teal:hover {
    background: linear-gradient(135deg, var(--teal-light) 0%, #5eead4 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(20, 184, 166, 0.45);
}

.btn-ghost {
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: var(--radius-md);
}

.btn-ghost:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: var(--white);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    background: #ffffff;
    color: #1f1f1f;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-google:hover {
    background: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.btn-google:active {
    transform: translateY(0);
}

.google-icon {
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-dim);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.auth-divider span {
    padding: 0 14px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-purple {
    background: rgba(91, 63, 212, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(91, 63, 212, 0.35);
}

.badge-teal {
    background: rgba(20, 184, 166, 0.15);
    color: var(--teal-light);
    border: 1px solid rgba(20, 184, 166, 0.35);
}

.badge-gold {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-light);
    border: 1px solid rgba(212, 175, 55, 0.35);
}

.badge-draft {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-published {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* ==============================================================================
   PUBLIC LANDING PAGE
   ============================================================================== */
#public-landing-view {
    position: relative;
    overflow-x: hidden;
}

/* Landing Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    z-index: 1000;
    transition: all var(--transition-base);
    background: rgba(11, 10, 20, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.landing-nav.scrolled {
    background: rgba(11, 10, 20, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.landing-nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 10px var(--purple-glow);
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--white) 30%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.landing-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.landing-link:hover {
    color: var(--white);
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    padding: 6px;
}

/* ==============================================================================
   HERO SECTION (SPLIT-SCREEN WITH AMBIENT RIBBON & 3D STAGE)
   ============================================================================== */
.hero-section {
    position: relative;
    padding: 130px 0 80px;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 50% 15%, rgba(91, 63, 212, 0.22) 0%, rgba(20, 184, 166, 0.08) 45%, transparent 75%);
    overflow: hidden;
}

.hero-glow-1 {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(91, 63, 212, 0.28) 0%, transparent 70%);
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.hero-glow-2 {
    position: absolute;
    top: 30%;
    right: 5%;
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.22) 0%, transparent 70%);
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

/* Left Column: Typography & CTAs */
.hero-left {
    text-align: left;
}

.hero-tagline-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    background: rgba(91, 63, 212, 0.14);
    border: 1px solid rgba(91, 63, 212, 0.4);
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 22px;
    box-shadow: 0 4px 15px rgba(91, 63, 212, 0.15);
}

.hero-tagline-pill .dot {
    width: 7px;
    height: 7px;
    background: var(--teal);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--teal);
}

.hero-headline {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.12;
    margin-bottom: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-headline .highlight-gradient {
    background: linear-gradient(135deg, #a78bfa 0%, var(--teal-light) 60%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtext {
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 580px;
    margin-bottom: 34px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

/* Minimalist Floating Pill / Ambient Ribbon */
.hero-ambient-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    max-width: 100%;
}

.hero-ambient-ribbon:hover {
    background: rgba(91, 63, 212, 0.14);
    border-color: rgba(91, 63, 212, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(91, 63, 212, 0.22);
}

.ribbon-glow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 10px var(--teal);
    animation: ribbonPulse 2s infinite ease-in-out;
}

@keyframes ribbonPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.35); opacity: 0.5; }
}

.ribbon-badge {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--teal);
    background: rgba(20, 184, 166, 0.12);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.ribbon-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.ribbon-stat {
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.ribbon-arrow {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.2s ease;
}

.hero-ambient-ribbon:hover .ribbon-arrow {
    transform: translateX(4px);
    color: var(--teal-light);
}

/* Right Column: 3D Visual Stage */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual-stage {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 440px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-aura {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 63, 212, 0.4) 0%, rgba(20, 184, 166, 0.25) 50%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
    animation: auraFloat 8s ease-in-out infinite alternate;
}

@keyframes auraFloat {
    0% { transform: scale(0.95) translate(0, 0); }
    100% { transform: scale(1.1) translate(10px, -10px); }
}

/* 3D Perspective Book */
.stage-book-card {
    position: relative;
    z-index: 2;
    perspective: 1200px;
    cursor: pointer;
}

.stage-book-wrap {
    position: relative;
    width: 220px;
    aspect-ratio: 2/3;
    border-radius: 6px 14px 14px 6px;
    transform: rotateY(-14deg) rotateX(4deg);
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
    box-shadow: -15px 20px 45px rgba(0, 0, 0, 0.75), 0 0 35px rgba(91, 63, 212, 0.25);
    background: #110e24;
}

.stage-book-card:hover .stage-book-wrap {
    transform: rotateY(-4deg) rotateX(2deg) translateY(-8px);
    box-shadow: -18px 26px 55px rgba(0, 0, 0, 0.85), 0 0 50px rgba(91, 63, 212, 0.4);
}

.stage-book-spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(0, 0, 0, 0.5) 100%);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    z-index: 3;
    pointer-events: none;
}

.stage-book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px 14px 14px 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: block;
}

.stage-book-glare {
    position: absolute;
    inset: 0;
    border-radius: 6px 14px 14px 6px;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    pointer-events: none;
    z-index: 2;
}

/* Floating Glass Badge (Audiobook) */
.floating-badge.badge-audio {
    position: absolute;
    top: 25px;
    left: -15px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 15px;
    border-radius: 14px;
    background: rgba(18, 16, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    animation: floatBadge 6s ease-in-out infinite alternate;
}

@keyframes floatBadge {
    0% { transform: translateY(0); }
    100% { transform: translateY(-7px); }
}

.badge-audio .badge-icon {
    font-size: 1.25rem;
}

.badge-audio .badge-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.badge-audio strong {
    font-size: 0.82rem;
    color: var(--white);
    font-weight: 700;
}

.badge-audio small {
    font-size: 0.68rem;
    color: var(--teal);
}

/* Floating Glass Card (Live Reader Stats) */
.floating-reader-card {
    position: absolute;
    bottom: 10px;
    right: -20px;
    z-index: 4;
    width: 250px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(22, 19, 44, 0.88);
    border: 1px solid rgba(91, 63, 212, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(91, 63, 212, 0.18);
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: floatReader 7s ease-in-out infinite alternate;
}

@keyframes floatReader {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

.floating-reader-card:hover {
    border-color: rgba(20, 184, 166, 0.5);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 35px rgba(20, 184, 166, 0.25);
}

.reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.reader-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.reader-pill .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #a78bfa;
}

.rating-pill {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-light);
}

.reader-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reader-desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reader-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reader-progress-track {
    flex: 1;
    height: 4px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.reader-progress-fill {
    height: 100%;
    width: 78%;
    background: linear-gradient(90deg, var(--purple) 0%, var(--teal) 100%);
    border-radius: 9999px;
}

.reader-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Mobile & Tablet Adjustments for Split-Screen Hero */
@media (max-width: 992px) {
    .hero-section {
        padding: 120px 0 60px;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-left {
        text-align: center;
    }
    .hero-subtext {
        margin: 0 auto 30px;
    }
    .hero-ctas {
        justify-content: center;
    }
    .hero-ambient-ribbon {
        margin: 0 auto;
    }
    .hero-visual-stage {
        height: 380px;
    }
    .stage-book-wrap {
        width: 190px;
    }
    .floating-reader-card {
        right: 0;
        bottom: 0;
        width: 230px;
    }
    .floating-badge.badge-audio {
        left: 0;
    }
}

@media (max-width: 576px) {
    .hero-ambient-ribbon {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 16px;
        padding: 10px 14px;
        gap: 8px;
    }
    .ribbon-stat {
        display: none;
    }
    .hero-visual-stage {
        height: 340px;
    }
    .stage-book-wrap {
        width: 160px;
    }
    .floating-reader-card {
        width: 200px;
        padding: 10px 12px;
    }
    .reader-desc {
        display: none;
    }
}

/* Section Common Styling */
.section-pad {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-block;
    color: var(--teal);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.2;
    margin-bottom: 18px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

.about-quote-box {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(91, 63, 212, 0.12) 0%, rgba(20, 184, 166, 0.08) 100%);
    border-left: 4px solid var(--purple);
    margin-top: 28px;
}

.about-quote-box p {
    font-style: italic;
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.about-quote-box span {
    color: var(--teal);
    font-size: 0.9rem;
    font-weight: 600;
}

.about-pillars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pillar-card {
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: transform var(--transition-base);
}

.pillar-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-highlight);
}

.pillar-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    display: inline-block;
}

.pillar-card h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.pillar-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.feature-card {
    padding: 36px 30px;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(91, 63, 212, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(91, 63, 212, 0.2) 0%, rgba(20, 184, 166, 0.1) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.feature-perk {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--teal-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* For Writers Journey */
.writers-journey {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 40px;
    position: relative;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    text-align: center;
    position: relative;
    transition: all var(--transition-base);
}

.step-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
}

.step-num {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple) 0%, var(--teal) 100%);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 4px 12px var(--purple-glow);
}

.step-card h4 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Download Section */
.download-box {
    background: linear-gradient(135deg, rgba(28, 24, 56, 0.8) 0%, rgba(14, 22, 38, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.download-info h3 {
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.download-info p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 520px;
    margin-bottom: 28px;
    line-height: 1.6;
}

.download-badges {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    color: var(--white);
    transition: all var(--transition-fast);
}

.store-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--teal);
    transform: translateY(-2px);
}

.store-btn-icon {
    font-size: 1.8rem;
}

.store-btn-text small {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.store-btn-text strong {
    font-size: 1rem;
    font-weight: 700;
}

.store-badge-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-style: dashed;
}

.store-badge-disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.08);
}

/* Footer */
.landing-footer {
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
    background: #07060e;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 320px;
    margin: 16px 0 24px;
    line-height: 1.6;
}

.footer-col h5 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--teal-light);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ==============================================================================
   LOGGED-IN PLATFORM SHELL
   ============================================================================== */
#app-view {
    display: flex;
    min-height: 100vh;
    background: var(--bg-base);
}

/* Desktop Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 500;
    transition: transform var(--transition-smooth);
}

.sidebar-header {
    height: var(--navbar-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.nav-item:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--white);
    background: linear-gradient(135deg, rgba(91, 63, 212, 0.25) 0%, rgba(20, 184, 166, 0.15) 100%);
    border: 1px solid rgba(91, 63, 212, 0.4);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(91, 63, 212, 0.15);
}

.nav-item .nav-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple) 0%, var(--teal) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-meta {
    flex: 1;
    min-width: 0;
}

.user-meta .username {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta .user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--teal);
    text-transform: capitalize;
}

/* App Main Content Area */
.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-topbar {
    height: var(--navbar-height);
    background: rgba(18, 16, 36, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 400;
}

.app-topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.app-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-content {
    flex: 1;
    padding: 32px;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(18, 16, 36, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    z-index: 900;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 8px 12px;
}

.mobile-nav-item.active {
    color: var(--teal-light);
}

.mobile-nav-item .icon {
    font-size: 1.25rem;
}

/* ==============================================================================
   DISCOVER VIEW
   ============================================================================== */
.discover-hero {
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    background: linear-gradient(135deg, rgba(91, 63, 212, 0.35) 0%, rgba(20, 184, 166, 0.2) 100%), var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}

.discover-hero h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.discover-hero p {
    color: var(--text-muted);
    max-width: 540px;
    font-size: 1rem;
    margin-bottom: 24px;
}

/* Search and Filters */
.search-filter-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 480px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 14px 20px 14px 46px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
}

.search-input-wrapper input:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 15px var(--purple-glow);
    background: rgba(30, 27, 56, 0.9);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 1.1rem;
}

.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill-btn {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.pill-btn:hover {
    color: var(--white);
    border-color: var(--border-hover);
}

.pill-btn.active {
    background: var(--purple);
    border-color: var(--purple);
    color: var(--white);
    box-shadow: 0 4px 12px var(--purple-glow);
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 28px;
}

.book-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.book-card:hover {
    transform: translateY(-6px);
    border-color: rgba(91, 63, 212, 0.45);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(91, 63, 212, 0.2);
}

.book-cover-container {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    background: #18162e;
    overflow: hidden;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.book-card:hover .book-cover-img {
    transform: scale(1.04);
}

.book-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #1f1b40 0%, #0d1726 100%);
    color: var(--text-dim);
}

.book-cover-placeholder .icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--purple);
}

.book-badge-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.book-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.book-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.book-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-dim);
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.book-rating {
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

/* ==============================================================================
   MY LIBRARY VIEW
   ============================================================================== */
.library-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.tab-btn {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--white);
}

.tab-btn.active {
    color: var(--white);
    background: rgba(91, 63, 212, 0.2);
    border: 1px solid rgba(91, 63, 212, 0.4);
}

/* Continue Reading Banner */
.continue-reading-banner {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(30, 27, 56, 0.9) 0%, rgba(20, 184, 166, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}

.continue-reading-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.continue-cover {
    width: 65px;
    height: 95px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

/* ==============================================================================
   WRITER STUDIO / MY BOOKS
   ============================================================================== */
.studio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 20px;
    flex-wrap: wrap;
}

.studio-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.stat-card {
    padding: 22px 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    display: block;
}

.stat-card .value {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--white);
}

/* Studio Editor View */
.editor-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    min-height: calc(100vh - 170px);
}

.editor-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(100vh - 170px);
}

.editor-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.chapters-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.chapter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chapter-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.chapter-item.active {
    background: rgba(91, 63, 212, 0.25);
    border-color: rgba(91, 63, 212, 0.4);
    font-weight: 600;
}

.chapter-title-text {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.chapter-reorder-btns {
    display: flex;
    gap: 4px;
    opacity: 0.6;
}

.chapter-item:hover .chapter-reorder-btns {
    opacity: 1;
}

.editor-main-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    padding: 28px 36px;
    position: relative;
}

.editor-top-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 16px;
}

.chapter-title-input {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    background: transparent;
    border: none;
    outline: none;
    width: 60%;
}

.chapter-title-input::placeholder {
    color: var(--text-dim);
}

.editor-save-state {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}

.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-saved {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-saving {
    background: rgba(91, 63, 212, 0.2);
    color: #c4b5fd;
    animation: pulse 1.5s infinite;
}

.status-unsaved {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.status-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Quill Styling Customization */
.quill-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ql-toolbar.ql-snow {
    border: 1px solid var(--border) !important;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 10px !important;
}

.ql-container.ql-snow {
    border: 1px solid var(--border) !important;
    border-top: none !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    flex: 1;
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-main);
    background: rgba(10, 9, 18, 0.4);
    min-height: 480px;
}

.ql-editor {
    padding: 24px !important;
    min-height: 480px;
}

.ql-snow .ql-stroke {
    stroke: var(--text-muted) !important;
}

.ql-snow .ql-fill {
    fill: var(--text-muted) !important;
}

.ql-snow .ql-picker {
    color: var(--text-muted) !important;
}

.editor-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ==============================================================================
   READER VIEW (Comfortable distraction-free mode)
   ============================================================================== */
#reader-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    overflow-y: auto;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Reader Themes */
#reader-view.theme-dark {
    background-color: var(--reader-dark-bg);
    color: var(--reader-dark-text);
}

#reader-view.theme-light {
    background-color: var(--reader-light-bg);
    color: var(--reader-light-text);
}

#reader-view.theme-sepia {
    background-color: var(--reader-sepia-bg);
    color: var(--reader-sepia-text);
}

.reader-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--purple);
    width: 0%;
    z-index: 2100;
    transition: width 0.1s linear;
}

.reader-header {
    position: sticky;
    top: 0;
    height: 64px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2050;
    border-bottom: 1px solid rgba(128, 128, 128, 0.15);
}

.reader-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reader-article {
    max-width: 740px;
    margin: 60px auto 100px;
    padding: 0 24px;
    line-height: 1.9;
}

.reader-article.font-serif {
    font-family: var(--font-serif);
}

.reader-article.font-sans {
    font-family: var(--font-body);
}

.reader-chapter-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 32px;
    text-align: center;
}

.reader-body-content p {
    margin-bottom: 1.6em;
}

.reader-nav-footer {
    max-width: 740px;
    margin: 40px auto 80px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(128, 128, 128, 0.15);
}

/* ==============================================================================
   MODALS & OVERLAYS
   ============================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 6, 14, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    padding: 36px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform var(--transition-smooth);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    font-size: 1.3rem;
    padding: 6px;
    border-radius: 50%;
}

.modal-close-btn:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

/* Forms in Modals */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 14px var(--purple-glow);
    background: rgba(255, 255, 255, 0.07);
}

textarea.form-control {
    resize: vertical;
}

/* Phone Mockup Preview Modal */
.phone-mockup-frame {
    width: 360px;
    height: 720px;
    background: #000;
    border-radius: 46px;
    border: 10px solid #27272a;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.phone-notch {
    width: 140px;
    height: 24px;
    background: #27272a;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-screen {
    flex: 1;
    background: #0F0F1E;
    overflow-y: auto;
    padding: 44px 20px 20px;
    color: #FAFAFA;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--white);
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--purple); }

/* Keyframes */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==============================================================================
   RESPONSIVE DESIGN (Tablets & Phones)
   ============================================================================== */
@media (max-width: 1024px) {
    .writers-journey {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .editor-layout {
        grid-template-columns: 1fr;
    }
    
    .editor-sidebar {
        max-height: 240px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .download-box {
        flex-direction: column;
        text-align: center;
    }
    
    .download-badges {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .landing-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .app-sidebar {
        transform: translateX(-100%);
    }
    
    .app-sidebar.mobile-open {
        transform: translateX(0);
        width: 280px;
    }
    
    .app-main {
        margin-left: 0;
        padding-bottom: 70px;
    }
    
    .mobile-bottom-nav {
        display: flex;
    }
    
    .writers-journey {
        grid-template-columns: 1fr;
    }
    
    .showcase-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .showcase-cover {
        max-width: 180px;
        margin: 0 auto;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }
    
    .editor-main-panel {
        padding: 20px 16px;
    }
    
    .chapter-title-input {
        width: 100%;
        font-size: 1.4rem;
    }
}
