/*
 * ═══════════════════════════════════════════════════════════════════
 * UNIVERSUM PORTAL // GENESIS ENGINE v7.0
 * Premium Cosmic UI Framework - Fully Optimized
 * ═══════════════════════════════════════════════════════════════════
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600;700&display=swap');

/* ═══════════════════════════════════════════════════════════════════
   SECTION 1: CSS VARIABLES & THEMES
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* Core Colors - Deep Space */
    --void-black: #050508;
    --void-purple: #0d0a1a;
    --deep-purple: #1a1030;
    --cosmic-purple: #2d1b4e;
    --nebula-purple: #4a2c7a;
    --star-purple: #7c3aed;
    --glow-purple: #a855f7;
    --plasma-cyan: #22d3ee;
    --plasma-pink: #f472b6;
    
    /* UI Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    /* Glass Effects */
    --glass-bg: rgba(13, 10, 26, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    
    /* Shadows & Glows */
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.3);
    
    /* Typography */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Exo 2', sans-serif;
    
    /* Animation */
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ═══════════════════════════════════════════════════════════════════
   LIGHT THEME - COMPLETELY REDESIGNED
   ═══════════════════════════════════════════════════════════════════ */

[data-theme="light"] {
    --void-black: #f8f9fc;
    --void-purple: #eef0f5;
    --deep-purple: #e2e5ed;
    --cosmic-purple: #d0d5e3;
    
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(100, 80, 160, 0.15);
    
    --star-purple: #6d28d9;
    --glow-purple: #8b5cf6;
    
    --shadow-soft: 0 10px 40px rgba(100, 80, 160, 0.15);
    --shadow-glow: 0 0 30px rgba(109, 40, 217, 0.2);
}

[data-theme="light"] .main-header {
    background: linear-gradient(180deg, rgba(248,249,252,0.98) 0%, rgba(248,249,252,0) 100%);
}

[data-theme="light"] .card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(100, 80, 160, 0.12);
    box-shadow: 0 4px 20px rgba(100, 80, 160, 0.1);
}

[data-theme="light"] .card:hover {
    box-shadow: 0 15px 40px rgba(109, 40, 217, 0.2);
}

[data-theme="light"] .header-nav {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(100, 80, 160, 0.12);
}

[data-theme="light"] .control-btn,
[data-theme="light"] .modal-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(100, 80, 160, 0.15);
    color: var(--text-primary);
}

[data-theme="light"] .modal-overlay {
    background: rgba(248, 249, 252, 0.7);
}

[data-theme="light"] .modal-container {
    background: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .modal-header {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(100, 80, 160, 0.1);
}

[data-theme="light"] .book-sidebar {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(100, 80, 160, 0.1);
}

[data-theme="light"] .reaction-picker,
[data-theme="light"] .reaction-picker-popup {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(100, 80, 160, 0.15);
}

[data-theme="light"] .reaction-chip {
    background: rgba(100, 80, 160, 0.08);
}

[data-theme="light"] .reaction-add-btn {
    background: rgba(100, 80, 160, 0.05);
    border-color: rgba(100, 80, 160, 0.2);
}

[data-theme="light"] .chapter-nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(100, 80, 160, 0.15);
}

[data-theme="light"] .gallery-tab {
    background: rgba(100, 80, 160, 0.05);
    border-color: rgba(100, 80, 160, 0.15);
}

/* Featured news light theme */
[data-theme="light"] .featured-news {
    background: linear-gradient(135deg, rgba(100, 80, 160, 0.1), rgba(168, 85, 247, 0.15));
}

[data-theme="light"] .featured-content {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
}

[data-theme="light"] .featured-title,
[data-theme="light"] .featured-excerpt,
[data-theme="light"] .featured-stats,
[data-theme="light"] .featured-date {
    color: #1a1a2e;
}

[data-theme="light"] .featured-stats span {
    color: #4a4a6a;
}

[data-theme="light"] .news-filters {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(100, 80, 160, 0.15);
}

[data-theme="light"] .filter-input,
[data-theme="light"] .filter-select {
    background: rgba(100, 80, 160, 0.05);
    border-color: rgba(100, 80, 160, 0.2);
    color: #1a1a2e;
}

[data-theme="light"] .filter-tag {
    background: rgba(100, 80, 160, 0.08);
    border-color: rgba(100, 80, 160, 0.2);
    color: #4a4a6a;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 2: RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--void-black);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color 0.5s ease, color 0.3s ease;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--nebula-purple); border-radius: 3px; }

::selection { background: var(--star-purple); color: white; }

/* ═══════════════════════════════════════════════════════════════════
   SECTION 3: BOOT SEQUENCE
   ═══════════════════════════════════════════════════════════════════ */

#boot-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--void-black);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s;
    overflow: hidden;
}

#boot-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#holo-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.4; /* Subtle overall */
}

.boot-center {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 60px;
    background: rgba(5, 5, 8, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.boot-logo {
    font-family: var(--font-display);
    font-size: clamp(32px, 8vw, 56px);
    font-weight: 900;
    letter-spacing: 8px;
    color: transparent;
    background: linear-gradient(90deg, var(--star-purple), var(--plasma-cyan), var(--plasma-pink), var(--star-purple));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    animation: shimmer 2s linear infinite;
    margin-bottom: 40px;
}

.boot-progress-container {
    width: min(300px, 60vw);
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.boot-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--star-purple), var(--plasma-cyan));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.boot-status {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.boot-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.boot-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--star-purple);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 4: CANVAS BACKGROUND
   ═══════════════════════════════════════════════════════════════════ */

#cosmos-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    background: radial-gradient(ellipse at 70% 80%, var(--cosmic-purple) 0%, var(--void-purple) 40%, var(--void-black) 100%);
    transition: background 0.5s ease;
}

[data-theme="light"] #cosmos-bg {
    background: radial-gradient(ellipse at 70% 80%, var(--cosmic-purple) 0%, var(--void-purple) 40%, var(--void-black) 100%);
}

#planet-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 5: HEADER
   ═══════════════════════════════════════════════════════════════════ */

.main-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 70px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(15px, 4vw, 40px);
    background: linear-gradient(180deg, rgba(5,5,8,0.95) 0%, rgba(5,5,8,0) 100%);
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.8s var(--ease-out-expo), opacity 0.8s ease;
}

.main-header.visible {
    transform: translateY(0);
    opacity: 1;
}

.header-logo {
    font-family: var(--font-display);
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-nav {
    display: flex;
    gap: 4px;
    background: var(--glass-bg);
    padding: 6px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
}

.nav-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    white-space: nowrap;
}

.nav-btn:hover {
    color: var(--text-primary);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--star-purple), var(--glow-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    backdrop-filter: var(--glass-blur);
}

.control-btn:hover {
    background: var(--star-purple);
    border-color: var(--star-purple);
    color: white;
    transform: translateY(-2px);
}

.lang-toggle {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    width: auto;
    padding: 0 14px;
    border-radius: 19px;
}

.mobile-toggle {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 6: MAIN CONTENT LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

.main-wrapper {
    position: relative;
    z-index: 10;
    padding-top: 80px;
    min-height: 100vh;
}

.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(15px, 4vw, 40px) 60px;
}

.section-header {
    text-align: center;
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeIn 0.8s var(--ease-out-expo) forwards 0.3s;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: clamp(12px, 2vw, 14px);
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 7: CARD GRID
   ═══════════════════════════════════════════════════════════════════ */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: clamp(15px, 3vw, 30px);
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: cardEnter 0.6s var(--ease-out-expo) forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.15s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.25s; }
.card:nth-child(5) { animation-delay: 0.3s; }
.card:nth-child(6) { animation-delay: 0.35s; }

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--star-purple);
    box-shadow: var(--shadow-glow);
}

.card-image {
    width: 100%;
    aspect-ratio: 16/10;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.card:hover .card-image img {
    transform: scale(1.08);
}

.card-image-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--void-black), transparent);
    pointer-events: none;
}

.card-content {
    padding: clamp(15px, 3vw, 24px);
}

.card-category {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--glow-purple);
    margin-bottom: 10px;
    padding: 4px 10px;
    background: rgba(168, 85, 247, 0.15);
    border-radius: 15px;
}

.card-title {
    font-family: var(--font-display);
    font-size: clamp(16px, 2vw, 18px);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-excerpt {
    font-size: clamp(12px, 1.5vw, 14px);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
}

.card-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Card Meta & Footer */
.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.card-date {
    font-size: 11px;
    color: var(--text-muted);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

/* Tag Badges */
.tag-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 12px;
    color: white;
}

.tag-badge.small {
    font-size: 8px;
    padding: 3px 8px;
}

/* New Badge */
.new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #f472b6, #ec4899);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

/* Quick Reaction on Cards */
.quick-reaction {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.quick-reaction:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--star-purple);
}

.reaction-count {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.reaction-icons {
    font-size: 14px;
}

.quick-picker {
    position: absolute;
    bottom: 100%;
    right: 0;
    display: flex;
    gap: 4px;
    padding: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.quick-picker button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.quick-picker button:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.2);
}

/* ═══════════════════════════════════════════════════════════════════
   NEWS FILTERS
   ═══════════════════════════════════════════════════════════════════ */

.news-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin-bottom: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.filter-search {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.filter-input {
    width: 100%;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 13px;
}

.filter-input:focus {
    outline: none;
    border-color: var(--star-purple);
}

.filter-tags {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
    scrollbar-color: var(--star-purple) transparent;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
}

.filter-tags::-webkit-scrollbar {
    height: 4px;
}

.filter-tags::-webkit-scrollbar-track {
    background: transparent;
}

.filter-tags::-webkit-scrollbar-thumb {
    background: var(--star-purple);
    border-radius: 2px;
}

.filter-tag {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-tag:hover {
    border-color: var(--tag-color, var(--star-purple));
    color: var(--text-primary);
}

.filter-tag.active {
    background: var(--tag-color, var(--star-purple));
    border-color: transparent;
    color: white;
}

.filter-sort {
    min-width: 150px;
}

.filter-select {
    width: 100%;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--star-purple);
}

.filter-select option {
    background: var(--void-black);
    color: var(--text-primary);
}

@media (max-width: 700px) {
    .news-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-search {
        max-width: none;
    }
    
    .filter-tags {
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   FEATURED NEWS
   ═══════════════════════════════════════════════════════════════════ */

.featured-news {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 25px;
    cursor: pointer;
    min-height: 200px;
    max-height: 240px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.4s var(--ease-out-expo);
}

.featured-news:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.featured-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.featured-news:hover .featured-image img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(5, 5, 8, 0.95) 0%, rgba(5, 5, 8, 0.3) 60%, transparent 100%);
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(12px, 3vw, 25px);
    background: linear-gradient(to top, rgba(5, 5, 8, 0.95) 0%, rgba(5, 5, 8, 0.7) 60%, transparent 100%);
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.featured-date {
    font-size: 12px;
    color: var(--text-muted);
}

.featured-title {
    font-family: var(--font-display);
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.featured-excerpt {
    font-size: clamp(14px, 2vw, 16px);
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 600px;
}

.featured-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.featured-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.featured-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-comment {
    margin-top: 15px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    max-width: 500px;
}

.comment-user {
    color: var(--glow-purple);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   DTF-STYLE REACTIONS
   ═══════════════════════════════════════════════════════════════════ */

.reactions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 15px 0;
    margin: 20px 0;
    border-top: 1px solid var(--glass-border);
}

.reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reaction-chip:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--star-purple);
    transform: scale(1.05);
}

.reaction-chip:active {
    transform: scale(0.95);
}

.reaction-emoji {
    font-size: 15px;
}

.reaction-count {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.reaction-add-wrap {
    position: relative;
}

.reaction-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--glass-border);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-add-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--star-purple);
    border-style: solid;
    color: var(--text-primary);
}

.reaction-picker-popup {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    display: flex;
    gap: 2px;
    padding: 8px 12px;
    background: rgba(20, 15, 35, 0.98);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 200;
    white-space: nowrap;
}

.reaction-picker-popup.open,
.reaction-picker-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.picker-emoji {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picker-emoji:hover {
    background: rgba(168, 85, 247, 0.2);
    transform: scale(1.3);
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 8: MODAL / READER
   ═══════════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(8px);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out-expo);
    cursor: pointer;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--void-black);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s var(--ease-out-expo);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    cursor: default;
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
    gap: 15px;
}

.modal-title-group {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.modal-title {
    font-family: var(--font-display);
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.modal-controls {
    display: flex;
    gap: 8px;
}

.modal-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.modal-btn:hover {
    background: var(--star-purple);
    border-color: var(--star-purple);
    color: white;
}

.modal-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.reader-progress {
    height: 3px;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.reader-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--star-purple), var(--plasma-cyan));
    width: 0%;
    transition: width 0.15s ease;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 9: ARTICLE READER (News/Wiki)
   ═══════════════════════════════════════════════════════════════════ */

.article-reader {
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 50px);
}

.article-hero {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 13px;
    color: var(--text-muted);
    align-items: center;
}

.scroll-to-comments {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--star-purple);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scroll-to-comments:hover {
    background: var(--nebula-pink);
    transform: scale(1.05);
}

/* Card Reactions */
.card-reactions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.mini-reaction {
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(168, 85, 247, 0.15);
    border-radius: 12px;
    color: var(--text-secondary);
}

/* Fullscreen Mode */
.modal-container.fullscreen-mode {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}

.book-reader-layout.fullscreen {
    height: 100vh;
}

.book-reader-layout.fullscreen .book-sidebar {
    display: none;
}

.comic-reader.fullscreen {
    padding: 0;
}

.comic-reader.fullscreen .comic-page {
    max-height: 100vh;
    border-radius: 0;
}

/* Big Fullscreen Button */
.fullscreen-big-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--star-purple), var(--nebula-pink));
    border: none;
    border-radius: 50px;
    color: white;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 25px rgba(168, 85, 247, 0.4);
}

.fullscreen-big-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 35px rgba(168, 85, 247, 0.5);
}

.fullscreen-big-btn i {
    font-size: 18px;
}

/* Gallery Viewer */
.gallery-viewer {
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.gallery-image-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.gallery-full-image {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.gallery-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.gallery-title {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--text-primary);
    margin: 0;
}

.gallery-category {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: white;
}

.article-body {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body p {
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 10: BOOK READER - SIDEBAR LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

.book-reader-layout {
    display: flex;
    height: 100%;
}

.book-sidebar {
    width: 280px;
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

.book-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.book-sidebar-title {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.book-search {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
}

.book-search:focus {
    outline: none;
    border-color: var(--star-purple);
}

.book-chapters-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chapter-item {
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.chapter-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.chapter-item.active {
    background: var(--star-purple);
    color: white;
}

.book-sidebar-actions {
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
}

.sidebar-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sidebar-btn:hover {
    background: var(--star-purple);
    border-color: var(--star-purple);
    color: white;
}

.book-content-area {
    flex: 1;
    overflow-y: auto;
    padding: clamp(20px, 4vw, 40px);
}

/* Reader Settings Bar */
.reader-settings {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 15px 20px;
    margin-bottom: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.setting-btn:hover {
    background: var(--star-purple);
    border-color: var(--star-purple);
    color: white;
}

.setting-value {
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
}

.progress-display {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: var(--star-purple);
    min-width: 45px;
    text-align: center;
}

.book-content {
    max-width: 700px;
    margin: 0 auto;
    font-family: 'Georgia', serif;
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.9;
    color: var(--text-secondary);
}

.book-content h2 {
    font-family: var(--font-display);
    color: var(--star-purple);
    font-size: clamp(22px, 3vw, 28px);
    margin: 40px 0 25px;
}

/* Chapter Navigation */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.chapter-nav-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 45%;
}

.chapter-nav-btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--star-purple);
    transform: translateY(-2px);
}

.chapter-nav-btn i {
    font-size: 18px;
    color: var(--star-purple);
}

.chapter-nav-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.chapter-nav-btn.next .chapter-nav-info {
    text-align: right;
}

.chapter-nav-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chapter-nav-title {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

@media (max-width: 600px) {
    .chapter-nav {
        flex-direction: column;
    }
    
    .chapter-nav-btn {
        max-width: 100%;
    }
}

.book-content p {
    margin-bottom: 20px;
    text-indent: 1.5em;
}

.highlight {
    background: rgba(168, 85, 247, 0.3);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 11: COMIC READER
   ═══════════════════════════════════════════════════════════════════ */

.comic-reader {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(20px, 4vw, 40px);
    gap: 20px;
}

.comic-view {
    position: relative;
    display: flex;
    justify-content: center;
}

.comic-click-zone {
    position: absolute;
    top: 0;
    width: 25%;
    height: 100%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.comic-click-zone.left {
    left: 0;
    cursor: w-resize;
}

.comic-click-zone.right {
    right: 0;
    cursor: e-resize;
}

.comic-click-zone:hover {
    background: linear-gradient(to right, rgba(168, 85, 247, 0.15), transparent);
}

.comic-click-zone.right:hover {
    background: linear-gradient(to left, rgba(168, 85, 247, 0.15), transparent);
}

.comic-page {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.comic-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    position: sticky;
    bottom: 20px;
}

.comic-page-indicator {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--text-primary);
    letter-spacing: 2px;
    min-width: 80px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 12: REACTION SYSTEM (COMPACT PICKER)
   ═══════════════════════════════════════════════════════════════════ */

.reaction-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    position: relative;
}

.reaction-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reaction-trigger:hover {
    border-color: var(--star-purple);
    background: rgba(168, 85, 247, 0.1);
}

.reaction-trigger-icon {
    font-size: 18px;
}

.reaction-trigger-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.reaction-trigger-count {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--star-purple);
    font-weight: 700;
}

.reaction-picker {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--spring);
    margin-bottom: 10px;
}

.reaction-picker.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.reaction-option {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 22px;
    transition: all 0.2s var(--spring);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-option:hover {
    transform: scale(1.3);
    background: rgba(255,255,255,0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 13: COMMENTS
   ═══════════════════════════════════════════════════════════════════ */

.comments-section {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 0 clamp(15px, 3vw, 20px);
}

.comments-header {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.comment-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.comment-name-input {
    width: 120px;
    padding: 12px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 13px;
    flex-shrink: 0;
}

.comment-input {
    flex: 1;
    padding: 14px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 14px;
}

.comment-input:focus {
    outline: none;
    border-color: var(--star-purple);
}

.comment-submit {
    padding: 14px 20px;
    background: var(--star-purple);
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-submit:hover {
    background: var(--glow-purple);
    transform: scale(1.05);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: rgba(255,255,255,0.02);
    border-radius: 14px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--star-purple), var(--plasma-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.comment-author span {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 11px;
    margin-left: 8px;
}

.comment-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.comment-item.popular {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.popular-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: white;
    margin-left: 8px;
}

.comment-date {
    color: var(--text-muted);
    font-size: 11px;
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.comment-action-btn:hover {
    color: var(--star-purple);
}

.comment-replies {
    margin-top: 12px;
    margin-left: 20px;
    border-left: 2px solid rgba(168, 85, 247, 0.3);
    padding-left: 15px;
}

.comment-item.reply {
    padding: 10px;
    background: rgba(255,255,255,0.01);
}

.comment-item.reply .comment-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
}

.reply-form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.reply-form.hidden {
    display: none;
}

.comment-input.small {
    padding: 8px 12px;
    font-size: 12px;
}

.comment-submit.small {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 14: GALLERY
   ═══════════════════════════════════════════════════════════════════ */

/* Gallery Filters */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.gallery-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.gallery-tab:hover {
    border-color: var(--cat-color, var(--star-purple));
    color: var(--text-primary);
}

.gallery-tab.active {
    background: var(--cat-color, var(--star-purple));
    border-color: transparent;
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: clamp(10px, 2vw, 20px);
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s var(--ease-out-expo);
}

.gallery-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item-title {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: scale(1.03);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 15: CONTACT FORM
   ═══════════════════════════════════════════════════════════════════ */

.contact-container {
    max-width: 550px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: clamp(25px, 5vw, 45px);
    backdrop-filter: blur(20px);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--glow-purple);
    margin-bottom: 8px;
}

.form-input, .form-textarea {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    padding: 14px 18px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--star-purple);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--star-purple), var(--glow-purple));
    border: none;
    border-radius: 14px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(124, 58, 237, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION 16: MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* Mobile Section Navigation Arrows */
.section-nav {
    display: none;
}

.section-nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.section-nav-arrow:active {
    background: var(--star-purple);
    border-color: var(--star-purple);
    color: white;
    transform: translateY(-50%) scale(0.95);
}

.section-nav-arrow.prev {
    left: 10px;
}

.section-nav-arrow.next {
    right: 10px;
}

@media (max-width: 900px) {
    /* Hide desktop nav on mobile */
    .header-nav {
        display: none !important;
    }
    
    /* Show section navigation arrows */
    .section-nav {
        display: block;
    }
    
    /* Simplify header on mobile */
    .header-logo {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .header-controls {
        gap: 6px;
    }
    
    .lang-toggle {
        padding: 0 10px;
        font-size: 10px;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    /* Book reader mobile */
    .book-reader-layout {
        flex-direction: column;
    }
    
    .book-sidebar {
        width: 100%;
        max-height: 50vh;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .book-sidebar.collapsed {
        max-height: 60px;
    }
    
    .book-sidebar.collapsed .book-chapters-list,
    .book-sidebar.collapsed .book-sidebar-actions {
        display: none;
    }
}

@media (max-width: 600px) {
    .main-header {
        height: 56px;
        padding: 0 12px;
    }
    
    .main-wrapper {
        padding-top: 76px;
    }
    
    .header-logo {
        font-size: 16px;
        letter-spacing: 1px;
    }
    
    .control-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
    
    .header-controls {
        gap: 5px;
    }
    
    .lang-toggle {
        padding: 0 10px;
        font-size: 10px;
    }
    
    .section-nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
    
    .reaction-picker {
        gap: 4px;
        padding: 10px 12px;
    }
    
    .reaction-option {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    
    /* Cards on mobile */
    .card-content {
        padding: 15px;
    }
    
    .section-header {
        margin-bottom: 30px;
        padding: 0 50px;
    }
    
    .section-title {
        letter-spacing: 2px;
        font-size: clamp(22px, 5vw, 32px);
    }
}

@media (max-width: 400px) {
    .header-logo {
        font-size: 14px;
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .section-nav-arrow {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }
    
    .section-header {
        padding: 0 45px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE ADAPTATIONS FOR NEW FEATURES
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Featured news smaller on tablet */
    .featured-news {
        min-height: 220px;
        max-height: 280px;
        margin-bottom: 20px;
    }
    
    .featured-title {
        font-size: 20px;
    }
    
    .featured-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    /* Fullscreen button */
    .fullscreen-big-btn {
        max-width: 250px;
        padding: 12px 24px;
        font-size: 12px;
    }
    
    /* Gallery viewer */
    .gallery-viewer {
        padding: 15px;
    }
    
    .gallery-full-image {
        max-height: 50vh;
    }
    
    .gallery-title {
        font-size: 16px;
    }
    
    /* Book reader */
    .book-sidebar {
        width: 180px;
    }
    
    .reader-settings {
        gap: 15px;
        padding: 10px 15px;
    }
    
    /* Modal smaller on tablet */
    .modal-container {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    /* News filters */
    .news-filters {
        padding: 15px;
        gap: 10px;
    }
    
    .filter-search {
        max-width: 100%;
    }
}

@media (max-width: 500px) {
    /* Featured news even smaller on mobile */
    .featured-news {
        min-height: 180px;
        max-height: 240px;
        border-radius: 16px;
    }
    
    .featured-content {
        padding: 15px;
    }
    
    .featured-title {
        font-size: 16px;
    }
    
    .featured-excerpt {
        font-size: 12px;
        display: none;
    }
    
    .featured-stats {
        font-size: 11px;
    }
    
    /* Hide book sidebar on mobile */
    .book-sidebar {
        display: none;
    }
    
    .book-content-area {
        padding: 15px;
    }
    
    /* Fullscreen button full width */
    .fullscreen-big-btn {
        max-width: 100%;
        padding: 14px 20px;
    }
    
    /* Card reactions */
    .card-reactions {
        flex-wrap: wrap;
    }
    
    .mini-reaction {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    /* Gallery */
    .gallery-full-image {
        max-height: 40vh;
        border-radius: 12px;
    }
    
    .gallery-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Reactions row */
    .reactions-row {
        flex-wrap: wrap;
    }
    
    .reaction-chip {
        padding: 5px 10px;
    }
    
    .reaction-picker-popup {
        position: fixed;
        left: 10px !important;
        right: 10px;
        bottom: 20px;
        top: auto;
        transform: none;
        width: auto;
    }
    
    /* Comments */
    .comments-widget {
        padding: 15px;
    }
    
    /* Chapter navigation */
    .chapter-nav-btn {
        padding: 12px 15px;
    }
    
    .chapter-nav-title {
        font-size: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SCROLL TO TOP BUTTON
   ═══════════════════════════════════════════════════════════════════ */

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--star-purple), var(--nebula-pink));
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 25px rgba(168, 85, 247, 0.4);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 35px rgba(168, 85, 247, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════
   QUICK REACTIONS ON CARDS
   ═══════════════════════════════════════════════════════════════════ */

/* Card Top Comment Preview */
.card-top-comment {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-top: 10px;
    background: rgba(168, 85, 247, 0.08);
    border-radius: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
}

.top-comment-badge {
    font-size: 10px;
}

.top-comment-user {
    color: var(--star-purple);
    font-weight: 600;
    white-space: nowrap;
}

.top-comment-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-reactions {
    display: flex;
    gap: 4px;
    margin-top: 10px;
}

.quick-reaction {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reaction:hover {
    background: rgba(168, 85, 247, 0.3);
    transform: scale(1.05);
}

.quick-reaction.active {
    background: var(--star-purple);
    border-color: var(--star-purple);
}

.quick-reaction-emoji {
    font-size: 14px;
}

.quick-reaction-count {
    color: var(--text-secondary);
    font-weight: 500;
}

.quick-reaction.active .quick-reaction-count {
    color: white;
}

.quick-add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.1);
    border: 1px dashed rgba(168, 85, 247, 0.3);
    color: var(--star-purple);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-add-btn:hover {
    background: rgba(168, 85, 247, 0.2);
    border-style: solid;
}

/* ═══════════════════════════════════════════════════════════════════
   BOOK READER - FLOATING CONTROLS
   ═══════════════════════════════════════════════════════════════════ */

.reader-floating-controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.reader-floating-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.2);
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reader-floating-btn:hover {
    background: var(--star-purple);
    transform: scale(1.1);
}

.reader-floating-btn.active {
    background: var(--star-purple);
}

.reader-progress-mini {
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: var(--star-purple);
    font-weight: 600;
    font-size: 14px;
}

/* Book reader pleasant background */
.book-content-area {
    background: linear-gradient(180deg, #0a0a12 0%, #12121f 50%, #0a0a12 100%);
}

/* ═══════════════════════════════════════════════════════════════════
   IMMERSIVE READER (NEW DESIGN)
   Focus-first, minimal, typography-optimized
   ═══════════════════════════════════════════════════════════════════ */

.reader-immersive {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0a0a0f;
    position: relative;
}

.reader-immersive.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

/* ─────────────────────────────────────────────────────────────────────
   Top Bar - Minimal, fades on scroll
   ───────────────────────────────────────────────────────────────────── */

.reader-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.reader-topbar.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.topbar-left,
.topbar-right {
    display: flex;
    gap: 8px;
}

.topbar-center {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.topbar-chapter {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.topbar-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.topbar-aa {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────────────
   Settings Popover
   ───────────────────────────────────────────────────────────────────── */

.reader-settings-popover {
    position: absolute;
    top: 100%;
    right: 20px;
    margin-top: 8px;
    padding: 16px;
    background: rgba(20, 20, 28, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    min-width: 200px;
}

.reader-settings-popover.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 8px 0;
}

.settings-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.settings-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-btn.active {
    background: var(--star-purple);
    border-color: var(--star-purple);
    color: white;
}

.settings-value {
    font-size: 13px;
    color: white;
    min-width: 24px;
    text-align: center;
}

/* ─────────────────────────────────────────────────────────────────────
   Progress Bar - Thin, unobtrusive
   ───────────────────────────────────────────────────────────────────── */

.reader-progress-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 61px;
    z-index: 99;
}

.reader-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--star-purple), var(--nebula-pink));
    transition: width 0.1s ease;
}

/* ─────────────────────────────────────────────────────────────────────
   Drawer (Chapters Sidebar)
   ───────────────────────────────────────────────────────────────────── */

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.reader-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #12121a;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.reader-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin: 0;
    letter-spacing: 0.5px;
}

.drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.drawer-chapters {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.drawer-chapter {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.drawer-chapter:hover {
    background: rgba(255, 255, 255, 0.05);
}

.drawer-chapter.active {
    background: rgba(168, 85, 247, 0.15);
}

.drawer-chapter-num {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drawer-chapter.active .drawer-chapter-num {
    background: var(--star-purple);
    color: white;
}

.drawer-chapter-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────────────────────────────
   Main Content - Typography Focused
   ───────────────────────────────────────────────────────────────────── */

.reader-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px 20px 60px;
    scroll-behavior: smooth;
}

/* Theme variations */
.reader-content[data-theme="dark"] {
    background: #0a0a0f;
}

.reader-content[data-theme="sepia"] {
    background: #f4ecd8;
}

.reader-content[data-theme="light"] {
    background: #fafafa;
}

.reader-article {
    max-width: 680px;
    margin: 0 auto;
    font-family: 'Georgia', 'Times New Roman', 'Noto Serif', serif;
    font-size: 18px;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

.reader-content[data-theme="dark"] .reader-article {
    color: rgba(255, 255, 255, 0.85);
}

.reader-content[data-theme="sepia"] .reader-article {
    color: #433422;
}

.reader-content[data-theme="light"] .reader-article {
    color: #1a1a1a;
}

.reader-article h2 {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 1.5em;
    font-weight: 600;
    margin: 2em 0 1em;
    letter-spacing: -0.02em;
}

.reader-content[data-theme="dark"] .reader-article h2 {
    color: white;
}

.reader-content[data-theme="sepia"] .reader-article h2 {
    color: #2a1f14;
}

.reader-content[data-theme="light"] .reader-article h2 {
    color: #000;
}

.reader-article p {
    margin-bottom: 1.5em;
    text-align: justify;
    hyphens: auto;
}

.reader-article p:first-of-type::first-letter {
    font-size: 3.2em;
    float: left;
    line-height: 1;
    margin-right: 0.1em;
    margin-top: 0.05em;
    color: var(--star-purple);
}

/* ─────────────────────────────────────────────────────────────────────
   Chapter Navigation - Subtle links
   ───────────────────────────────────────────────────────────────────── */

.reader-chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 680px;
    margin: 60px auto 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
}

.chapter-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: var(--star-purple);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.chapter-link:hover {
    opacity: 0.8;
}

.chapter-link span {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─────────────────────────────────────────────────────────────────────
   Reader Footer - Collapsible reactions/comments
   ───────────────────────────────────────────────────────────────────── */

.reader-footer {
    max-width: 680px;
    margin: 0 auto;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    padding-top: 20px;
}

.reader-footer-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid rgba(128, 128, 128, 0.2);
    border-radius: 10px;
    color: rgba(128, 128, 128, 0.8);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reader-footer-toggle:hover {
    background: rgba(128, 128, 128, 0.1);
    color: var(--star-purple);
}

.reader-footer-toggle i {
    transition: transform 0.3s ease;
}

.reader-footer.expanded .reader-footer-toggle i {
    transform: rotate(180deg);
}

.reader-footer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.reader-footer.expanded .reader-footer-content {
    max-height: 2000px;
    margin-top: 20px;
}

/* ─────────────────────────────────────────────────────────────────────
   Responsive adjustments
   ───────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .reader-content {
        padding: 30px 16px 50px;
    }
    
    .reader-article {
        font-size: 17px;
        line-height: 1.7;
    }
    
    .topbar-chapter {
        font-size: 12px;
    }
    
    .reader-drawer {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .reader-topbar {
        padding: 10px 12px;
    }
    
    .topbar-icon {
        width: 32px;
        height: 32px;
    }
    
    .reader-content {
        padding: 20px 14px 40px;
    }
    
    .reader-article {
        font-size: 16px;
    }
    
    .chapter-link span {
        max-width: 120px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   TWO-COLUMN BOOK MODE (Fullscreen)
   ═══════════════════════════════════════════════════════════════════ */

.reader-content.book-mode {
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.reader-article.two-column {
    column-count: 2;
    column-gap: 60px;
    column-rule: 1px solid rgba(128, 128, 128, 0.2);
    max-width: 1400px;
    margin: 0 auto;
    text-align: justify;
    hyphens: auto;
}

.book-floating-ui {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    padding: 12px 24px;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reader-immersive.fullscreen:hover .book-floating-ui {
    opacity: 1;
}

.floating-nav,
.floating-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.float-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.float-btn:hover:not(:disabled) {
    background: var(--star-purple);
    color: white;
}

.float-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.float-progress {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    min-width: 60px;
    text-align: center;
}

@media (max-width: 1200px) {
    .reader-article.two-column {
        column-count: 1;
        max-width: 680px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   COMIC READER (Immersive)
   ═══════════════════════════════════════════════════════════════════ */

.comic-immersive {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
}

.comic-immersive.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

/* Comic Top Bar */
.comic-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.comic-topbar.visible {
    opacity: 1;
    transform: translateY(0);
}

.comic-title {
    font-size: 14px;
    color: white;
    font-weight: 500;
    margin-left: 15px;
}

/* Paged View */
.comic-paged-view {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.comic-page-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.comic-page-img.fit-width {
    width: 100%;
    height: auto;
    max-height: none;
}

.comic-page-img.fit-height {
    height: 100%;
    width: auto;
    max-width: none;
}

.comic-click-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    cursor: pointer;
    z-index: 10;
}

.comic-click-zone.left {
    left: 0;
}

.comic-click-zone.right {
    right: 0;
}

/* Scroll View (Webtoon) */
.comic-scroll-view {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    scrollbar-width: none;
}

.comic-scroll-view::-webkit-scrollbar {
    display: none;
}

.comic-scroll-img {
    width: 100%;
    max-width: 800px;
    display: block;
}

/* Scrubber */
.comic-scrubber {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    z-index: 100;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.comic-scrubber.visible {
    opacity: 1;
    transform: translateY(0);
}

.scrubber-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.scrubber-btn:hover:not(:disabled) {
    background: var(--star-purple);
}

.scrubber-btn:disabled {
    opacity: 0.3;
}

.scrubber-track {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scrubber-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.scrubber-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--star-purple);
    cursor: pointer;
}

.scrubber-label {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.comic-footer {
    padding: 30px 20px;
    background: var(--void-black);
}

/* ═══════════════════════════════════════════════════════════════════
   MASONRY GALLERY
   ═══════════════════════════════════════════════════════════════════ */

.masonry-grid {
    columns: 4 280px;
    column-gap: 20px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    opacity: 0;
    animation: masonryFadeIn 0.5s ease forwards;
}

@keyframes masonryFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 15px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
}

.masonry-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.masonry-cat {
    font-size: 11px;
    color: var(--star-purple);
    margin-top: 4px;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   GALLERY LIGHTBOX
   ═══════════════════════════════════════════════════════════════════ */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 60px 80px;
}

.lightbox-image-wrap {
    max-width: 90%;
    max-height: 80vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav.prev { left: 20px; }
.lightbox-nav.next { right: 20px; }

.lightbox-nav:hover:not(:disabled) {
    background: var(--star-purple);
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 50px;
}

.lightbox-title {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin: 0;
}

.lightbox-cat {
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    color: white;
}

.lightbox-actions {
    display: flex;
    gap: 8px;
}

.lightbox-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lightbox-btn:hover {
    background: var(--star-purple);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-counter {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: var(--star-purple);
    color: white;
    font-size: 14px;
    font-weight: 500;
    border-radius: 30px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 20000;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════ */

.hidden { display: none !important; }
.text-glow { text-shadow: 0 0 15px var(--glow-purple); }

/* ═══════════════════════════════════════════════════════════════════
   FULLSCREEN SPLASH
   ═══════════════════════════════════════════════════════════════════ */

#fullscreen-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 12, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

#fullscreen-splash.active {
    opacity: 1;
    visibility: visible;
}

.fs-splash-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#fullscreen-splash.active .fs-splash-content {
    transform: scale(1) translateY(0);
}

.fs-splash-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.fs-splash-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, var(--star-purple), var(--nebula-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.fs-splash-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.fs-splash-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fs-splash-btn {
    padding: 14px 28px;
    border-radius: 50px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.fs-splash-btn.primary {
    background: linear-gradient(135deg, var(--star-purple), var(--nebula-pink));
    color: white;
    box-shadow: 0 5px 25px rgba(168, 85, 247, 0.4);
}

.fs-splash-btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 35px rgba(168, 85, 247, 0.5);
}

.fs-splash-btn.secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.fs-splash-btn.secondary:hover {
    color: var(--text-primary);
    border-color: var(--star-purple);
}
