/* 
    Comic Reader Platform Prototype - Design System
    Theme: Modern Comic Book (Bold, Vibrant, High-Contrast)
*/

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;600&family=Outfit:wght@700;900&display=swap');

:root {
    /* Color Palette */
    --primary-red: #EF233C;
    --primary-red-hover: #D90429;
    --accent-yellow: #FFD60A;
    --bg-light: #FDFFFC;
    --bg-dark: #0B090A;
    --text-main: #0B090A;
    --text-white: #FFFFFF;
    --border-color: #EDF2F4;
    --glass-bg: rgba(255, 255, 255, 0.8);
    
    /* Spacing & Curvature */
    --radius-pill: 50px;
    --radius-card: 12px;
    --spacing-lg: 4rem;
    --spacing-md: 2rem;
    --spacing-sm: 1rem;
    
    /* Premium Shadows */
    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.1);
    --text-secondary: #6B7280;
    --shadow-soft: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-bold: 0 10px 20px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.98) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.main-content {
    padding-top: 90px; /* Matches navbar height */
    min-height: calc(100vh - 400px); /* Adjust based on footer */
}

@media (max-width: 768px) {
    .main-content { padding-top: 70px; }
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

/* --- Navigation (Pill Style) --- */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 20px rgba(0,0,0,0.02);
    transition: all 0.4s ease;
    width: 100%;
}

.nav-container.scrolled {
    height: 70px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    letter-spacing: 1px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    filter: drop-shadow(0 4px 10px rgba(239, 35, 60, 0.3));
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover .logo-icon {
    transform: scale(1.1) rotate(5deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-shrink: 1;
}

.nav-links a {
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-red);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: 0.3s;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-shrink: 0;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    /* Reset <button> browser defaults */
    background: none;
    border: none;
    padding: 4px;
    outline-offset: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 5px;
    transition: 0.3s;
}

/* Active Nav State */
.nav-links a.active {
    color: var(--primary-red);
    opacity: 1;
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-red);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: white;
    z-index: 999;
    padding: 100px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
}

/* --- Buttons --- */
.btn {
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(239, 35, 60, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}

.btn-outline:hover {
    background: var(--primary-red);
    color: white;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    flex: 1;
    padding-left: 10%;
}

.hero-content h1 {
    font-size: 5rem;
    line-height: 0.9;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary-red);
}

.search-box {
    margin-top: 30px;
    display: flex;
    max-width: 500px;
    background: white;
    padding: 5px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-bold);
    border: 2px solid var(--border-color);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    border-radius: var(--radius-pill);
    outline: none;
    font-size: 1rem;
}

.hero-image {
    flex: 1;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-light) 30%, #ffd60a55 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.superhero-graphic {
    width: 80%;
    transform: rotate(-3deg);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-bold);
    transition: 0.5s ease;
}

.superhero-graphic:hover {
    transform: scale(1.02) rotate(0deg);
}

/* --- Filter Chips --- */
.filter-container {
    margin-top: var(--spacing-sm);
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.filter-chip {
    padding: 6px 15px;
    background: #f0f0f0;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.3s;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--primary-red);
    color: white;
}

.filter-chip.pd-chip.active {
    background: linear-gradient(135deg, #FFD60A 0%, #EF233C 100%);
    color: #0B090A;
    border-color: transparent !important;
    box-shadow: 0 5px 15px rgba(239, 35, 60, 0.3);
    font-weight: 800;
}

/* --- Comic Grid --- */
.section {
    padding: var(--spacing-lg) 10%;
}

.section-header {
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.comic-card {
    background: white;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
    animation: fadeInScale 0.6s ease-out backwards;
}

.comic-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-premium);
    border-color: rgba(239, 35, 60, 0.2);
}

.card-thumb {
    height: 380px;
    overflow: hidden;
    position: relative;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.comic-card:hover .card-thumb img {
    transform: scale(1.08);
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-yellow);
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 900;
    border-radius: 5px;
    text-transform: uppercase;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.card-info .metadata {
    font-size: 0.8rem;
    color: #888;
}

/* Image zoom on hover */
.comic-card:hover .card-thumb img {
    transform: scale(1.1);
}

.card-thumb img {
    transition: 0.5s ease;
}

/* --- Skeletons --- */
.skeleton {
    background: #eee;
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    border-radius: 5px;
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

@keyframes shine {
    to {
        background-position-x: -200%;
    }
}

.skeleton-text { height: 1rem; width: 100%; margin-bottom: 0.5rem; }
.skeleton-title { height: 1.5rem; width: 80%; margin-bottom: 1rem; }
.skeleton-image { height: 100%; width: 100%; }

/* --- Auth Page --- */
.auth-wrapper {
    height: 100vh;
    display: flex;
}

.auth-sidebar {
    flex: 1;
    background: var(--bg-dark);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10%;
}

.auth-sidebar h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.auth-form-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-form {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #f9f9f9;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus {
    border-color: var(--primary-red);
    background: white;
}

.password-strength-meter {
    height: 4px;
    width: 100%;
    background: #eee;
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    background: var(--primary-red);
    transition: 0.5s;
}

.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.social-btn:hover {
    background: #f9f9f9;
}

/* --- Reader View --- */
.reader-container {
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
}

.reader-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.reader-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

.reader-page {
    width: 100%;
    max-width: 800px;
    margin-bottom: 40px;
    background: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.toggle-switch {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-pill);
    padding: 5px;
}

.toggle-item {
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
}

.toggle-item.active {
    background: white;
    color: var(--bg-dark);
}

/* --- Breadcrumbs --- */
.breadcrumb {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.4;
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.breadcrumb span::after {
    content: '/';
    margin-left: 10px;
}

.breadcrumb span:last-child::after { content: ''; }

/* --- Reader Features --- */
.zoom-controls {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 4px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 8px;
}

.zoom-btn:hover { background: rgba(255,255,255,0.1); }

/* --- Flip Mode Simulation --- */
.flip-view {
    perspective: 1000px;
    width: 800px;
    height: 1100px;
    margin: auto;
    position: relative;
    display: none; /* Shown via JS */
}

.flip-page {
    width: 50%;
    height: 100%;
    position: absolute;
    right: 0;
    transform-origin: left;
    transition: transform 1s;
    background: white;
    border: 1px solid #ddd;
    box-shadow: -10px 0 20px rgba(0,0,0,0.1);
}

.flip-page.flipped {
    transform: rotateY(-180deg);
}

/* --- Cookie Bubble --- */
.cookie-bubble {
    position: fixed;
    bottom: 30px;
    left: 30px;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    z-index: 10000;
    transform: translateY(150%);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.cookie-bubble.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    gap: 15px;
    align-items: center;
}

.cookie-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

.cookie-text h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    letter-spacing: 0;
}

.cookie-text p {
    font-size: 0.8rem;
    opacity: 0.7;
    line-height: 1.4;
}

.cookie-actions {
    display: flex;
    justify-content: flex-end;
}

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

body.cookie-modal-open {
    overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .hero { flex-direction: column; height: auto; padding-bottom: 40px; }
    .hero-content { padding: 80px 5% 40px; text-align: center; }
    .hero-content h1 { font-size: 2.5rem; }
    .search-box { margin: 30px auto; }
    
    .cookie-bubble {
        left: 20px;
        right: 20px;
        bottom: 20px;
        max-width: none;
    }
}
/* --- Premium & AI Features --- */
:root {
    --premium-gold: #FFD60A;
    --premium-gold-dark: #ccaa00;
}

.btn-premium {
    background: linear-gradient(135deg, var(--premium-gold) 0%, #ff9f1c 100%);
    color: var(--text-main);
    border: none;
    box-shadow: 0 4px 15px rgba(255, 214, 10, 0.3);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 214, 10, 0.5);
}

/* AI Badges */
.ai-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #7209b7;
    color: white;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
}

.ai-badge::before {
    content: '✨';
}

/* Ad Placeholders */
.ad-placeholder {
    background: #f1f1f1;
    border: 2px dashed #ddd;
    color: #bbb;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    position: relative;
}

.ad-placeholder::after {
    content: 'Sponsored Advertisement Area';
    position: absolute;
    font-size: 0.6rem;
    bottom: 5px;
    opacity: 0.5;
}

.ad-leaderboard { width: 100%; height: 90px; margin: 30px 0; }
.ad-skyscraper { width: 160px; height: 600px; display: none; } /* Hidden on mobile */
.ad-feed { grid-column: 1 / -1; height: 150px; background: #fafafa; }

/* AI Overlay & Interactions */
.ai-overlay {
    position: fixed;
    right: -400px;
    top: 100px;
    width: 350px;
    background: white;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    border-radius: 20px 0 0 20px;
    padding: 30px;
    z-index: 1001;
    transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    border: 1px solid var(--border-color);
}

.ai-overlay.open {
    right: 0;
}

.voice-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}

.voice-wave span {
    width: 3px;
    height: 100%;
    background: var(--primary-red);
    animation: wave 1s infinite ease-in-out;
}

@keyframes wave {
    0%, 100% { height: 5px; }
    50% { height: 20px; }
}

.voice-wave span:nth-child(2) { animation-delay: 0.2s; }
.voice-wave span:nth-child(3) { animation-delay: 0.4s; }

@media (min-width: 1200px) {
    .ad-skyscraper { display: flex; }
}
/* --- Dual-Reader Modes --- */
.mode-badge {
    padding: 6px 15px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.mode-safe {
    background: rgba(255,255,255,0.1);
    color: #aaa;
    border: 1px solid rgba(255,255,255,0.2);
}

.mode-enhanced {
    background: var(--accent-yellow);
    color: var(--text-main);
    box-shadow: 0 0 15px rgba(255, 214, 10, 0.4);
}

.viewer-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    background: #000;
}

.flip-book-overlay {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: rgba(0,0,0,0.7);
    padding: 20px 40px;
    border-radius: var(--radius-card);
    text-align: center;
    color: white;
    backdrop-filter: blur(5px);
}

.legal-overlay {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.8);
    color: rgba(255,255,255,0.5);
    padding: 8px;
    font-size: 0.7rem;
    text-align: center;
    z-index: 100;
}

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

.btn-tool {
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.btn-tool:hover {
    background: rgba(255,255,255,0.2);
}

/* =========================================
   AdSense & Legal Prep Components
========================================= */

/* Ad Placeholders */
.ad-placeholder {
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 20px auto;
    text-align: center;
}
.ad-banner {
    width: 728px;
    height: 90px;
    max-width: 100%;
}
.ad-skyscraper {
    width: 160px;
    height: 600px;
}

@media (max-width: 1200px) {
    .ad-skyscraper {
        display: none !important;
    }
}

/* Cookie Consent Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(11, 9, 10, 0.95);
    color: white;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    transform: translateY(100%);
    transition: transform 0.5s ease;
}
#cookie-banner.show {
    transform: translateY(0);
}
#cookie-banner p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

/* Premium Upgrade Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.premium-modal {
    background: var(--bg-light);
    border-radius: var(--radius-card);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    border: 1px solid rgba(239, 35, 60, 0.3);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.modal-overlay.active .premium-modal {
    transform: scale(1);
}
.premium-modal h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-red);
}
.premium-modal p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}
.premium-features {
    text-align: left;
    margin-bottom: 30px;
    list-style: none;
    padding: 0;
}
.premium-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.premium-features li::before {
    content: '✨';
}
.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    background: none; border: none;
    font-size: 1.5rem; color: var(--text-secondary);
    cursor: pointer;
}

/* --- New Homepage Sections Styling --- */
.category-card:hover {
    border-color: var(--primary-red) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    background: #fffafa;
}

.faq-item {
    transition: 0.3s;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 15px;
}

.faq-item:hover {
    background: #f1f1f1 !important;
}

/* Custom CTA Button Pulse */
@keyframes pulse-btn {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.btn-cta-final {
    animation: pulse-btn 2s infinite;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .hero-content h1 { font-size: 3rem !important; }
}

@media (max-width: 480px) {
    .section { padding: 40px 5% !important; }
    .hero-content h1 { font-size: 2.2rem !important; }
    .nav-actions .btn { display: none; }
}

/* ================================================================
   🔥 PREMIUM UI ENHANCEMENTS — Phase 2
   ================================================================ */

/* --- Micro-Animations Keyframes --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 35, 60, 0.0); }
    50% { box-shadow: 0 0 30px rgba(239, 35, 60, 0.15); }
}

/* --- Enhanced Comic Cards --- */
.comic-card {
    animation: fadeInUp 0.6s ease both;
    transform-origin: center bottom;
    will-change: transform;
}

.comic-card:nth-child(1) { animation-delay: 0.05s; }
.comic-card:nth-child(2) { animation-delay: 0.1s; }
.comic-card:nth-child(3) { animation-delay: 0.15s; }
.comic-card:nth-child(4) { animation-delay: 0.2s; }
.comic-card:nth-child(5) { animation-delay: 0.25s; }
.comic-card:nth-child(6) { animation-delay: 0.3s; }
.comic-card:nth-child(7) { animation-delay: 0.35s; }
.comic-card:nth-child(8) { animation-delay: 0.4s; }

.comic-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(239, 35, 60, 0.1);
    border-color: transparent;
}

/* Card image overlay gradient on hover */
.card-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.4));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.comic-card:hover .card-thumb::after {
    opacity: 1;
}

/* Badge glow on hover */
.comic-card:hover .badge {
    animation: glowPulse 1.5s infinite;
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* --- Image Fade-In on Load --- */
.card-thumb img {
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.card-thumb img.loaded,
.card-thumb img[src]:not([src=""]) {
    opacity: 1;
}

/* --- Enhanced Buttons --- */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #EF233C, #D90429);
    box-shadow: 0 4px 15px rgba(239, 35, 60, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #D90429, #B8001F);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 35, 60, 0.4);
}

/* --- Enhanced Search Box --- */
.search-box {
    transition: box-shadow 0.4s ease, border-color 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-red);
    box-shadow: 0 15px 40px rgba(239, 35, 60, 0.12), 0 0 0 3px rgba(239, 35, 60, 0.08);
}

.search-box input::placeholder {
    color: #aaa;
    transition: color 0.3s ease;
}

.search-box:focus-within input::placeholder {
    color: #ccc;
}

/* --- Section Headers Animation --- */
.section-header h2 {
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), transparent);
    border-radius: 4px;
}

/* --- Nav Link Underline Animation --- */
.nav-links a {
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

/* --- Category Cards Enhancement --- */
.category-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important;
}

/* --- Smooth Page Transitions --- */
main, .section, #featured {
    animation: fadeIn 0.4s ease;
}

/* --- Footer Enhancement --- */
footer {
    transition: background 0.3s ease;
}

footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-red), #D90429);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B8001F;
}

/* --- Selection Color --- */
::selection {
    background: rgba(239, 35, 60, 0.2);
    color: var(--text-main);
}

/* --- Enhanced Pagination --- */
.pagination a, .pagination span {
    transition: all 0.3s ease;
}

.pagination a:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Favorite Button Pulse --- */
.fav-btn.active {
    animation: glowPulse 2s infinite;
}

.fav-btn:hover {
    transform: scale(1.2) !important;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* --- Cookie Banner Enhancement --- */
#cookie-banner {
    animation: fadeInUp 0.5s ease 1s both;
    backdrop-filter: blur(10px);
}

/* --- Loading Skeleton Enhancement --- */
.skeleton {
    background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* --- Global Search Dropdown Enhancement --- */
#search-results {
    animation: fadeInUp 0.2s ease;
}

#search-results a:first-child {
    border-radius: 16px 16px 0 0;
}

#search-results a:last-child {
    border-radius: 0 0 16px 16px;
    border-bottom: none;
}

/* --- Mobile Touch Improvements --- */
@media (max-width: 768px) {
    .comic-card {
        animation-delay: 0s !important;
    }

    .btn {
        min-height: 48px;
        min-width: 48px;
    }

    .nav-search {
        display: none;
    }

    .card-thumb {
        height: 280px;
    }

    .comic-grid {
        gap: 16px;
    }

    .section-header h2::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .comic-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .card-thumb {
        height: 220px;
    }

    .card-info {
        padding: 12px !important;
    }

    .card-info h3 {
        font-size: 0.9rem !important;
        line-height: 1.2;
    }
}

/* --- Dashboard Light Aesthetic (matches public site palette) --- */
.dashboard-light {
    background: var(--bg-light, #FDFFFC);
    color: var(--text-main, #0b090a);
    min-height: 100vh;
    background-image: radial-gradient(circle at 50% 0%, rgba(239, 35, 60, 0.04) 0%, transparent 60%);
}

/* Legacy alias – kept so any missed templates don't break */
.dashboard-dark {
    background: var(--bg-light, #FDFFFC);
    color: var(--text-main, #0b090a);
    min-height: 100vh;
}

.glass-card {
    background: #ffffff;
    border: 1px solid #edf2f4;
    border-radius: 16px;
    padding: 30px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.glass-card:hover {
    background: #ffffff;
    transform: translateY(-5px);
    border-color: var(--primary-red);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
}

.border-red { border-left: 4px solid var(--primary-red); }
.border-purple { border-left: 4px solid #7209b7; }
.border-blue { border-left: 4px solid #4361ee; }

.welcome-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4.5rem;
    letter-spacing: 2px;
    line-height: 0.85;
    margin-bottom: 10px;
}

.welcome-title span {
    color: var(--primary-red);
}

.section-title-comic {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 1px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 8px;
}

.dashboard-nav-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
}

.toggle-btn {
    padding: 10px 25px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    background: transparent;
    color: #666;
}

.toggle-btn.active {
    background: var(--primary-red);
    color: white;
}

/* Image Zoom Effect */
.card-thumb {
    overflow: hidden;
}

.card-thumb img {
    transition: 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.comic-card:hover .card-thumb img {
    transform: scale(1.12) rotate(1deg);
}

/* Empty States */
.empty-state-hero {
    padding: 60px 40px;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
}

.empty-state-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.6;
    filter: grayscale(0.3);
}

/* ── Dashboard Component Classes ─────────────────── */
.dashboard-container {
    max-width: 1400px;
    margin: auto;
    padding: 40px 20px;
}

.dash-welcome-row {
    margin-bottom: 50px;
    animation: slideInRight 0.6s ease-out;
}

.dash-meta-row {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.dash-streak {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-red);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dash-last-read {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary, #6B7280);
}

.dash-divider {
    border: 0;
    border-top: 1px solid #edf2f4;
    margin-bottom: 40px;
}

.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .dash-stats-grid { grid-template-columns: 1fr; }
}

.dash-stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 220px;
    gap: 10px;
}

.dash-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.dash-stat-icon--purple { background: rgba(114, 9, 183, 0.08); color: #7209b7; }
.dash-stat-icon--red    { background: rgba(239, 35, 60, 0.08);  color: var(--primary-red); }
.dash-stat-icon--blue   { background: rgba(67, 97, 238, 0.08);  color: #4361ee; }

.dash-stat-value {
    font-size: 3.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    line-height: 1;
}

.dash-stat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--text-secondary, #6B7280);
}

.dash-section { margin-bottom: 60px; }

.dash-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 25px;
}

.dash-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary, #6B7280);
    text-decoration: none;
    transition: color 0.2s;
}

.dash-view-all:hover { color: var(--primary-red); }

.dash-continue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.dash-continue-link { text-decoration: none; color: inherit; }

.dash-continue-card {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    gap: 0;
    height: 140px;
    align-items: stretch;
}

.dash-continue-thumb {
    width: 100px;
    flex-shrink: 0;
    height: 100%;
}

.dash-continue-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-continue-info {
    flex: 1;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dash-resume-badge {
    font-size: 0.65rem;
    color: var(--primary-red);
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.dash-continue-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-continue-meta {
    font-size: 0.75rem;
    color: var(--text-secondary, #6B7280);
    margin-bottom: 10px;
}

.dash-progress-bg {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.dash-progress-fill {
    height: 100%;
    background: var(--primary-red);
    border-radius: 2px;
    transition: width 0.8s ease-in-out;
}

.dash-empty-full { grid-column: 1 / -1; }

.dash-bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .dash-bottom-grid { grid-template-columns: 1fr; }
}

.dash-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.dash-library-card {
    padding: 0 !important;
    overflow: hidden;
}

.dash-library-thumb {
    aspect-ratio: 2/3;
    position: relative;
}

.dash-library-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-library-info { padding: 20px; }

.dash-library-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.dash-library-pub {
    font-size: 0.8rem;
    color: var(--text-secondary, #6B7280);
}

.dash-library-btn {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 0.8rem;
}

.dash-sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.dash-widget-title {
    font-size: 1.2rem !important;
    margin-bottom: 16px !important;
}

.dash-rec-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-rec-item {
    display: flex;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border-radius: 10px;
    transition: background 0.2s;
}

.dash-rec-item:hover { background: #f8f9fa; }

.dash-rec-thumb {
    width: 48px;
    height: 66px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.dash-rec-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.dash-rec-title {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
}

.dash-rec-year {
    font-size: 0.7rem;
    color: var(--primary-red);
    font-weight: 800;
}

.dash-empty-text {
    font-size: 0.85rem;
    color: var(--text-secondary, #6B7280);
    text-align: center;
    padding: 20px 0;
}

.dash-settings-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dash-form-group { display: flex; flex-direction: column; gap: 6px; }

.dash-form-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary, #6B7280);
}

.dash-form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8f9fa;
    color: var(--text-main, #0b090a);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dash-form-input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: #ffffff;
}

.dash-form-btn { width: 100%; }

.dash-form-msg {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f0fdf4;
}

/* Footer & Accessibility */

footer a {
    opacity: 0.6;
    transition: 0.3s;
}

footer a:hover {
    opacity: 1;
    color: var(--primary-red);
}

.social-icons a:hover {
    transform: scale(1.2);
}

button:focus, a:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 4px;
}

/* --- Mobile Fixes --- */
@media (max-width: 900px) {
    .stats-grid-dark {
        grid-template-columns: 1fr !important;
    }
    
    .welcome-title {
        font-size: 3rem;
    }
    
    .dashboard-container {
        padding: 20px 15px;
    }
}


/* ================================================================
   🛡️ GDPR COOKIE CONSENT & PREFERENCES STYLING
   ================================================================ */

/* --- Global Scroll Padding to fix Sticky Header Overlap --- */
html {
    scroll-padding-top: 100px;
}

/* Floating Cookie Preference Accessor Badge */
.cookie-pref-floating-badge {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    z-index: 9998;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

.cookie-pref-floating-badge:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cookie-pref-floating-badge:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 3px;
}

/* ================================================================
   🍪 ONETRUST-STYLE COOKIE BANNER & PREFERENCES CENTER
   ================================================================ */

/* Footer Cookie Consent Banner */
.onetrust-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1100px;
    background: rgba(15, 15, 15, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px 28px;
    z-index: 9999;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.onetrust-banner-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 4px;
}

.onetrust-banner-close:hover {
    color: white;
}

.onetrust-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 32px;
}

.onetrust-banner-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.onetrust-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    align-items: center;
}

/* Button UI */
.onetrust-btn {
    padding: 10px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.onetrust-btn-white {
    background: #ffffff;
    color: #0f0f0f;
    border: 1px solid #ffffff;
}

.onetrust-btn-white:hover {
    background: rgba(255, 255, 255, 0.9);
}

.onetrust-btn-gray {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid transparent;
}

.onetrust-btn-gray:hover {
    background: rgba(255, 255, 255, 0.15);
}

.onetrust-btn-outline {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.onetrust-btn-outline:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.onetrust-btn-wide {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 0.88rem;
}

/* Privacy Preference Drawer (Slide-out from Left) */
.onetrust-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    animation: fadeIn 0.3s ease;
}

.onetrust-modal {
    background: #121212;
    color: #ffffff;
    width: 100%;
    max-width: 460px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 12px 0 48px rgba(0, 0, 0, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    animation: slideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.onetrust-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.onetrust-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.onetrust-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 4px;
}

.onetrust-modal-close:hover {
    color: white;
}

.onetrust-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.onetrust-desc-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin: 0;
}

.onetrust-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 8px 0 0 0;
    color: rgba(255, 255, 255, 0.4);
}

/* Accordion Component */
.onetrust-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.onetrust-accordion-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.onetrust-accordion-header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.onetrust-status-active {
    color: #38b000;
    font-size: 0.78rem;
    font-weight: 700;
}

.onetrust-accordion-content {
    padding: 14px 18px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.45;
    background: rgba(0, 0, 0, 0.1);
}

/* Switch Slider */
.onetrust-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
}

.onetrust-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.onetrust-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.25s ease;
    border-radius: 34px;
}

.onetrust-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s ease;
    border-radius: 50%;
}

.onetrust-switch input:checked + .onetrust-slider {
    background-color: #38b000;
}

.onetrust-switch input:checked + .onetrust-slider:before {
    transform: translateX(18px);
}

/* Footer of preference center drawer */
.onetrust-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.onetrust-footer-buttons {
    display: flex;
    gap: 12px;
}

.onetrust-footer-buttons button {
    flex: 1;
    text-align: center;
}

.onetrust-powered-by {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.onetrust-powered-by span {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
}

/* Animations */
@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .onetrust-banner {
        width: 100%;
        bottom: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        padding: 16px 20px 20px 20px;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
    .onetrust-banner-content {
        flex-direction: column;
        gap: 14px;
        align-items: stretch;
    }
    .onetrust-banner-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        gap: 8px;
    }
    .onetrust-banner-actions button {
        width: 100%;
        text-align: center;
    }
    .onetrust-modal {
        max-width: 100%;
    }
}


/* ================================================================
   💰 AD PLACEMENT CONTAINERS — CLS-Safe fixed dimensions
   ================================================================ */

/* In-feed horizontal banner (homepage / search / category grids) */
.ad-container-feed {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 250px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    border-radius: 12px;
    background: #f5f5f7;
    border: 1px dashed #ddd;
    position: relative;
    container-type: inline-size;
}

.ad-container-feed ins.adsbygoogle {
    display: block;
    width: 100%;
    min-height: 250px;
}

.ad-container-feed .ad-label {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    pointer-events: none;
    white-space: nowrap;
}

/* Sidebar rectangle (reader page, 300×250) */
.ad-container-sidebar {
    width: 100%;
    min-height: 280px;       /* 250px ad + 30px label */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid #222;
}

.ad-container-sidebar ins.adsbygoogle {
    display: block;
    width: 300px;
    height: 250px;
}

.ad-container-sidebar .ad-label {
    font-size: 0.6rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

/* End-of-comic banner */
.ad-container-end {
    width: 100%;
    min-height: 120px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #1a1a1a;
    padding: 20px 0 40px;
    background: #0a0a0a;
}

.ad-container-end ins.adsbygoogle {
    display: block;
    width: 100%;
    min-height: 90px;
}

.ad-container-end .ad-label {
    font-size: 0.6rem;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

/* Consent-gated: JS adds/removes this class. display:none avoids blank space before consent. */
.ad-consent-hidden {
    display: none !important;
}

/* Hide reader sidebar ad in focus mode and on mobile */
body.reader-container.focus-mode .ad-container-sidebar { display: none !important; }
body.reader-container.focus-mode .ad-container-end    { display: none !important; }

@media (max-width: 900px) {
    .ad-container-sidebar { display: none !important; }
}

/* ================================================================
   📌 LEFT / RIGHT RAIL ADS — Desktop only (≥ 1500px)
   Fixed to viewport edges, vertically top-aligned below nav.
   pointer-events:none on wrapper prevents scroll interference.
   ================================================================ */
.ad-rail-left,
.ad-rail-right {
    position: fixed;
    top: 100px;               /* clear the navbar */
    width: 160px;
    min-height: 600px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    pointer-events: none;     /* wrapper never blocks content clicks */
}

.ad-rail-left  { left:  10px; }
.ad-rail-right { right: 10px; }

.ad-rail-left ins.adsbygoogle,
.ad-rail-right ins.adsbygoogle {
    display: block;
    width: 160px;
    height: 600px;
    pointer-events: all;      /* restore clicks for the ad itself */
}

.ad-rail-label {
    font-size: 0.55rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    pointer-events: none;
}

/* Hidden on all screens below 1500px */
@media (max-width: 1499px) {
    .ad-rail-left,
    .ad-rail-right { display: none !important; }
}


@media (max-width: 640px) {
    .cookie-pref-floating-badge {
        left: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .cookie-settings-modal {
        width: calc(100% - 24px);
        padding: 24px 18px;
        border-radius: 22px;
    }

    .cookie-category-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-modal-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-modal-actions .btn {
        width: 100%;
    }

    .cookie-actions {
        width: 100%;
    }

    .cookie-actions .btn {
        flex: 1 1 100%;
    }
}


/* --- Unified Navigation Components --- */
.logo-text-wrapper {
    display: flex;
    align-items: baseline;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 1px;
}

.nav-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px !important;
    border: 1px solid #eee;
    border-radius: 30px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    outline: none;
    background: #f8f8f8;
    transition: 0.3s;
    box-sizing: border-box;
}

.nav-search-input:focus {
    border-color: var(--primary-red);
    background: #ffffff;
}

.nav-search-icon-wrapper {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.btn-manage-users {
    padding: 10px 15px;
    font-weight: 800;
    color: #ffffff !important;
    background: var(--primary-red);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-my-library {
    padding: 10px 15px;
    font-weight: 700;
    color: var(--primary-red) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-my-collections {
    padding: 10px 15px;
    font-weight: 700;
    color: var(--text-main) !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.btn-my-collections:hover {
    color: var(--primary-red) !important;
    background: rgba(239, 35, 60, 0.06);
}

/* ─── Animated Icons on Hover (Flaticon style animations) ─── */

/* 1. Spin Hover */
.ani-spin-on-hover:hover .fa-spin-hover,
a:hover .fa-spin-hover,
button:hover .fa-spin-hover,
.fa-spin-hover:hover,
a:hover .fa-users-gear, button:hover .fa-users-gear, .fa-users-gear:hover,
a:hover .fa-gear, button:hover .fa-gear, .fa-gear:hover {
    animation: fa-spin 2s infinite linear;
}

/* 2. Bounce Hover */
.ani-bounce-on-hover:hover .fa-bounce-hover,
a:hover .fa-bounce-hover,
button:hover .fa-bounce-hover,
.fa-bounce-hover:hover,
a:hover .fa-magnifying-glass, button:hover .fa-magnifying-glass, .fa-magnifying-glass:hover,
a:hover .fa-magnifying-glass-plus, button:hover .fa-magnifying-glass-plus, .fa-magnifying-glass-plus:hover,
a:hover .fa-magnifying-glass-minus, button:hover .fa-magnifying-glass-minus, .fa-magnifying-glass-minus:hover,
a:hover .fa-facebook-f, .fa-facebook-f:hover,
a:hover .fa-x-twitter, .fa-x-twitter:hover,
a:hover .fa-instagram, .fa-instagram:hover,
a:hover .fa-check, button:hover .fa-check, .fa-check:hover,
a:hover .fa-check-double, button:hover .fa-check-double, .fa-check-double:hover,
a:hover .fa-rocket, button:hover .fa-rocket, .fa-rocket:hover {
    animation: fa-bounce 1s infinite linear;
}

/* 3. Beat Hover */
.ani-beat-on-hover:hover .fa-beat-hover,
a:hover .fa-beat-hover,
button:hover .fa-beat-hover,
.fa-beat-hover:hover,
a:hover .fa-plus, button:hover .fa-plus, .fa-plus:hover,
a:hover .fa-folder-plus, button:hover .fa-folder-plus, .fa-folder-plus:hover,
a:hover .fa-user-plus, button:hover .fa-user-plus, .fa-user-plus:hover {
    animation: fa-beat 0.8s infinite linear;
}

/* 4. Wiggle/Shake Hover */
.ani-wiggle-on-hover:hover .fa-wiggle-hover,
a:hover .fa-wiggle-hover,
button:hover .fa-wiggle-hover,
.fa-wiggle-hover:hover,
a:hover .fa-calendar, button:hover .fa-calendar, .fa-calendar:hover,
a:hover .fa-sliders, button:hover .fa-sliders, .fa-sliders:hover,
a:hover .fa-lock, button:hover .fa-lock, .fa-lock:hover,
a:hover .fa-folder-open, button:hover .fa-folder-open, .fa-folder-open:hover {
    animation: fa-shake 0.6s infinite linear;
}

/* 5. Flip Hover */
.ani-flip-on-hover:hover .fa-flip-hover,
a:hover .fa-flip-hover,
button:hover .fa-flip-hover,
.fa-flip-hover:hover,
a:hover .fa-book, button:hover .fa-book, .fa-book:hover,
a:hover .fa-book-open, button:hover .fa-book-open, .fa-book-open:hover,
a:hover .fa-book-bookmark, button:hover .fa-book-bookmark, .fa-book-bookmark:hover {
    animation: fa-flip 1.5s infinite ease-in-out;
}

/* 6. Slide/Shift Hover */
.ani-slide-on-hover:hover .fa-slide-hover,
a:hover .fa-slide-hover,
button:hover .fa-slide-hover,
.fa-slide-hover:hover,
a:hover .fa-chevron-right, button:hover .fa-chevron-right, .fa-chevron-right:hover,
a:hover .fa-link, button:hover .fa-link, .fa-link:hover {
    transform: translateX(4px);
    transition: transform 0.2s ease-in-out;
}
a:hover .fa-chevron-left, button:hover .fa-chevron-left, .fa-chevron-left:hover {
    transform: translateX(-4px);
    transition: transform 0.2s ease-in-out;
}

/* 7. SVG Dashboard Stats Animations on Hover */
.stat-card {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(239, 35, 60, 0.2);
    box-shadow: var(--shadow-bold);
}

/* Book Swing (Comics Started) */
.stat-card:hover .stat-icon svg path, 
.stat-card:hover .stat-icon svg polyline {
    animation: svg-swing 1s ease-in-out infinite alternate;
}
@keyframes svg-swing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(10deg); }
}

/* Heart Beat (Favorites) */
.stat-card:hover .stat-icon svg {
    animation: svg-beat 0.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}
@keyframes svg-beat {
    0% { transform: scale(1); }
    30% { transform: scale(1.15); }
    60% { transform: scale(1); }
    80% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Check Pop (Completed) */
.stat-card:hover .stat-icon svg {
    animation: svg-pop 0.6s ease-out infinite alternate;
}
@keyframes svg-pop {
    0% { transform: scale(1); }
    100% { transform: scale(1.2) rotate(3deg); }
}

/* Chart Bounce (Completion Rate) */
.stat-card:hover .stat-icon svg {
    animation: svg-bounce 0.8s ease-in-out infinite alternate;
}
@keyframes svg-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

/* Fire Flicker (Streak) */
.stat-card:hover .stat-icon svg {
    animation: svg-flicker 0.6s ease-in-out infinite alternate;
}
@keyframes svg-flicker {
    0% { transform: scale(1) rotate(-1deg); opacity: 0.9; }
    100% { transform: scale(1.12) rotate(1deg); opacity: 1; filter: drop-shadow(0 2px 5px rgba(239,35,60,0.4)); }
}

/* Folder Shake (My Collections) */
.stat-card:hover .stat-icon svg {
    animation: svg-shake 0.5s ease-in-out infinite;
}
@keyframes svg-shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

/* ─── Auto-Animations for All Inline SVGs on Hover ─── */

/* General default hover transition for all SVGs */
svg {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

/* Make SVG scale up slightly inside links and buttons on hover */
a:hover svg,
button:hover svg,
.btn:hover svg,
.coll-arrow:hover svg,
.next-issue-card:hover svg {
    transform: scale(1.15);
}

/* Specific SVG shapes and action animations */
/* Trash/Delete icon wiggle (commonly has path/line inside warning/delete button) */
a:hover svg path[d*="M19"], button:hover svg path[d*="M19"],
a:hover svg line[x1="21"], button:hover svg line[x1="21"],
button.btn-delete:hover svg,
.btn-danger:hover svg {
    animation: fa-shake 0.6s infinite linear;
}

/* Clock / Time icon swing (commonly has circle + polyline/line) */
a:hover svg polyline, button:hover svg polyline,
a:hover svg line[x1="12"], button:hover svg line[x1="12"] {
    animation: svg-swing 1s ease-in-out infinite alternate;
}

/* Heart SVGs beat */
a:hover svg path[d*="M20.84"], button:hover svg path[d*="M20.84"],
.heart-icon:hover svg,
.btn-favorite:hover svg {
    animation: svg-beat 0.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Star SVGs rotate/pulse */
a:hover svg polygon[points*="12"], button:hover svg polygon[points*="12"],
.star-btn:hover {
    animation: svg-pop 0.6s ease-out infinite alternate;
}



/* --- Accessibility: Respect user motion preferences --- */
@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
    .comic-card:hover {
        transform: none !important;
    }
    .comic-card:hover .card-thumb img {
        transform: none !important;
    }
    .stat-card:hover {
        transform: none !important;
    }
    .stat-card:hover .stat-icon svg,
    .stat-card:hover .stat-icon svg path,
    .stat-card:hover .stat-icon svg polyline {
        animation: none !important;
    }
}
