/* =========================================
   1. CSS Variables & Themes
   ========================================= */
:root {
    /* Light Mode (Slightly Brighter Fantasy) */

    --bg: #141020;
    --bg2: #1e1630;

    --card: rgba(32, 22, 48, 0.7);
    --card-hover: rgba(44, 30, 65, 0.85);

    --gold: #d4af37;
    --gold-light: #f3d77b;

    --purple: #8550f5;
    --purple-glow: rgba(133, 80, 245, 0.4);

    --rose: #cb4f7e;

    --text: #f5f1eb;
    --muted: #c4bdd3;

    --border: rgba(255, 255, 255, 0.11);
    --border-hover: rgba(212, 175, 55, 0.4);
}

[data-theme="dark"] {
    --bg: #020106;
    --bg2: #0a0610;

    /* Brighter cards */
    --card: rgba(22, 18, 35, 0.88);
    --card-hover: rgba(35, 28, 55, 0.95);

    --gold: #e1c25a;
    --gold-light: #f3d77b;

    --purple: #9b6ff2;
    --purple-glow: rgba(155, 110, 242, 0.3);

    --rose: #d64d7b;

    --text: #e0e0e0;
    --muted: #888;

    /* Stronger border */
    --border: rgba(255, 255, 255, 0.09);
    --border-hover: rgba(225, 194, 90, 0.35);
}

/* =========================================
   2. Resets & Base
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

h1, h2, h3, h4 {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    line-height: 1.2;
}

img { width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* =========================================
   3. Celestial Backgrounds (Stars & Nebula)
   ========================================= */
.bg-celestial {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Nebula Glow */
.nebula-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, var(--purple-glow) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(193, 61, 107, 0.15) 0%, transparent 40%);
    opacity: 0.6;
    animation: nebulaShift 20s infinite alternate;
}

@keyframes nebulaShift {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, 2%); }
}

/* Stars generated by JS, container styled here */
#stars-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* =========================================
   4. Navigation
   ========================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 2rem;
    background: transparent;
    transition: background 0.3s ease;
}

.nav.scrolled {
    background: rgba(11, 7, 17, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 1rem; }


/* =========================================
Premium Luxury Theme Toggle
Performance Optimized
========================================= */

.theme-toggle {
width: 48px;
height: 48px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-radius: 50%;
border: 1px solid rgba(255,255,255,0.08);
background:
    linear-gradient(
        135deg,
        rgba(255,255,255,0.08),
        rgba(255,255,255,0.03)
    );

backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
overflow: hidden;
box-shadow:
    0 8px 20px rgba(0,0,0,0.25),
    inset 0 1px 1px rgba(255,255,255,0.08);

transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;

will-change: transform;
}

/* =========================================
Magical Ring
Only animates on hover
========================================= */

.theme-toggle::before {
content: "";
position: absolute;
inset: -2px;

border-radius: inherit;

background:
    conic-gradient(
        from 0deg,
        transparent,
        rgba(225,194,90,0.35),
        transparent,
        rgba(155,110,242,0.25),
        transparent
    );

opacity: 0;
transition: opacity 0.3s ease;
pointer-events: none;
}

.theme-toggle:hover::before {
opacity: 1;
animation: themeRingSpin 8s linear infinite;
}

@keyframes themeRingSpin {
to {
transform: rotate(360deg);
}
}

/* =========================================
Hover State
========================================= */

.theme-toggle:hover {
transform: translateY(-2px) scale(1.06);
border-color: rgba(225,194,90,0.35);

box-shadow:
    0 14px 35px rgba(0,0,0,0.35),
    0 0 18px rgba(225,194,90,0.15);
}

/* =========================================
Dark Theme Enhancement
========================================= */

[data-theme="dark"] .theme-toggle {
box-shadow:
0 10px 24px rgba(0,0,0,0.55),
0 0 16px rgba(155,110,242,0.10),
inset 0 1px 1px rgba(255,255,255,0.05);
}

[data-theme="dark"] .theme-toggle:hover {
box-shadow:
0 18px 40px rgba(0,0,0,0.65),
0 0 22px rgba(155,110,242,0.18),
0 0 12px rgba(225,194,90,0.10);
}

/* =========================================
SVG Icons
========================================= */

.theme-toggle svg {
position: absolute;

width: 22px;
height: 22px;

transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(.2,.8,.2,1);

will-change: transform, opacity;

}

/* =========================================
Icon Colors
========================================= */

.sun-icon {
color: var(--gold);
}

.moon-icon {
color: #b28dff;
}

/* =========================================
Correct Theme Logic
Light = Moon
Dark = Sun
========================================= */

/* Light Theme */

.sun-icon {
opacity: 0;
transform: rotate(90deg) scale(0.8);
}

.moon-icon {
opacity: 1;
transform: rotate(0deg) scale(1);
}

/* Dark Theme */

[data-theme="dark"] .sun-icon {
opacity: 1;
transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .moon-icon {
opacity: 0;
transform: rotate(-90deg) scale(0.8);
}

/* =========================================
Premium Glow
========================================= */

.theme-toggle:hover .sun-icon {
filter:
drop-shadow(0 0 6px rgba(225,194,90,0.55))
drop-shadow(0 0 12px rgba(225,194,90,0.20));
}

.theme-toggle:hover .moon-icon {
filter:
drop-shadow(0 0 6px rgba(178,141,255,0.55))
drop-shadow(0 0 12px rgba(178,141,255,0.20));
}

/* =========================================
Mobile Navigation Toggle
========================================= */

.mobile-toggle {
display: none;
flex-direction: column;
gap: 5px;
background: none;
border: none;
cursor: pointer;
padding: 0.5rem;
}

.mobile-toggle span {
width: 24px;
height: 2px;
background: var(--text);
transition: all 0.3s ease;
}



/* =========================================
   5. Hero Section
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.5) saturate(1.2);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.55) saturate(1.1);
}

.hero.hero-image .hero-gradient-overlay {
    background: linear-gradient(to bottom, rgba(11, 7, 17, 0.3), var(--bg));
}

.hero-overlay-image {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0.2;
    mix-blend-mode: overlay;
}

.hero-gradient-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(to bottom, rgba(11, 7, 17, 0.2), var(--bg));
}

.hero-content {
    position: relative;
    z-index: 4;
    text-align: center;
    max-width: 900px;
    padding: 6rem 2rem 4rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.2s forwards;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.hero-title span {
    display: block;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.8s ease 0.6s forwards;
}

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* =========================================
   6. Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 999px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: #0b0711;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

/* =========================================
   7. Sections
   ========================================= */
.section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-header { text-align: center; margin-bottom: 4rem; }
.section-label {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: clamp(2.75rem, 6vw, 4rem);
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.section-desc {
    color: var(--muted);
    max-width: 750px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }



/* =========================================
   QUOTE SECTION STYLES
   ========================================= */

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.quote-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    transition: transform 0.4s ease;
}

.quote-card:hover {
    transform: translateY(-5px);
}

.quote-card blockquote {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.quote-card cite {
    font-family: 'DM Sans', sans-serif;
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

/* Style 1: Fan Art / Scrapbook */
.quote-style-fanart {
    padding: 0;
    background: var(--card);
    border: 1px solid var(--border);
}

.fanart-image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.fanart-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.quote-style-fanart:hover .fanart-image img {
    transform: scale(1.05);
}

.fanart-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 1, 6, 0.92), rgba(2, 1, 6, 0.4));
    z-index: 2;
}

.fanart-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

.fanart-badge {
    display: block;
    width: fit-content;
    margin: 1.5rem auto 0; /* centers badge + keeps top spacing */
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.fanart-content {
    text-align: center;
}

/* Style 2: Dark Fantasy / Glow */
.quote-style-dark {
    background: radial-gradient(circle at center, rgba(40, 20, 60, 0.8), var(--bg));
    border: 1px solid var(--border);
    text-align: center;
    color: var(--text);
}

.dark-decor {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--purple);
}

.dark-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--purple);
    filter: blur(80px);
    opacity: 0.15;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.quote-style-dark:hover .dark-glow {
    opacity: 0.25;
}

.quote-style-dark blockquote {
    text-shadow: 0 0 20px rgba(133, 80, 245, 0.3);
}

/* Style 3: Editorial / Minimal */
.quote-style-editorial {
    background: transparent;
    border: 1px solid var(--border);
    position: relative;
}

.editorial-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.editorial-accent {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    opacity: 0.5;
}

.quote-style-editorial blockquote {
    font-style: italic;
}

.quote-style-editorial cite {
    color: var(--gold);
}


/* =========================================
   Quote Styles 4, 5, 6 (Full Width Versions)
   ========================================= */

/* -----------------------------------------
   Style 4: Constellation (Zodiac Theme)
   ----------------------------------------- */
.quote-style-constellation {
    /* Full Width Styling */
    width: 100%;
    min-height: 350px;
    
    background: radial-gradient(circle at 50% 50%, #1a1830 0%, #0b0711 100%);
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
    
    display: flex;
    align-items: center;
    justify-content: center;
}

.constellation-bg {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    transition: opacity 0.4s ease;
}

.quote-style-constellation:hover .constellation-bg {
    opacity: 0.7;
}

.star-icon {
    position: absolute;
    color: var(--gold);
    animation: twinkle 3s infinite ease-in-out;
}

.star-1 { top: 20%; left: 15%; animation-delay: 0s; }
.star-2 { top: 25%; right: 20%; animation-delay: 1.5s; }
.star-3 { bottom: 30%; left: 25%; animation-delay: 0.8s; }

.constellation-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    /* Prevent text from getting too wide on desktop */
    max-width: 800px; 
}

.quote-style-constellation blockquote {
    font-size: clamp(1.5rem, 3vw, 2.2rem); /* Larger text for full width */
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.quote-style-constellation cite {
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* -----------------------------------------
   Style 5: Premium Single Quote (Gold Gradient)
   ----------------------------------------- */

.quote-row {
    display: block;
    padding: 6rem 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.quote-style-gothic-wide {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    text-align: center;
}

.gothic-wide-border {
    display: none;
}

/* --- Mystical Gold Gradient Text --- */
.quote-style-gothic-wide blockquote {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    line-height: 1.4;
    margin-bottom: 2rem;
    font-weight: 400;

    /* Gradient Magic */
    background: linear-gradient(135deg, #f3d77b 0%, #d4af37 25%, #f7e2a0 50%, #d4af37 75%, #f3d77b 100%);
    
    -webkit-background-clip: text;
    background-clip: text;
    
    /* Fallback color for older browsers */
    -webkit-text-fill-color: transparent; 
    color: var(--gold); 

    /* Subtle drop shadow for depth */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.quote-style-gothic-wide cite {
    font-family: 'DM Sans', sans-serif;
    font-style: normal;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Hide Second Card */
.quote-style-gothic-square {
    display: none;
}

/* Responsive Padding */
@media (max-width: 768px) {
    .quote-row {
        padding: 4rem 1.5rem;
    }
}


/* =========================================
   CONTACT SECTION STYLES
   ========================================= */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    
    /* Flex layout for vertical centering */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contact-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* Icon Circle */
.contact-icon-wrap {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    color: var(--gold);
    transition: all 0.3s ease;
}

.contact-card:hover .contact-icon-wrap {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

/* Platform Name */
.contact-platform {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Links Container */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.contact-link {
    display: block;
    padding: 0.75rem 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .quotes-grid {
        grid-template-columns: 1fr;
    }
}

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


/* =========================================
   8. Books Grid
   ========================================= */

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.book-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);

    box-shadow:
        0 12px 35px rgba(0,0,0,0.25);
}

/* Extra depth in dark mode */
[data-theme="dark"] .book-card {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 15px 40px rgba(0,0,0,0.65);
}

.book-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);

    box-shadow:
        0 0 0 1px rgba(225,194,90,0.15),
        0 0 18px rgba(225,194,90,0.10),
        0 20px 50px rgba(0,0,0,0.45);
}

[data-theme="dark"] .book-card:hover {
    box-shadow:
        0 0 0 1px rgba(225,194,90,0.18),
        0 0 28px rgba(225,194,90,0.18),
        0 0 25px rgba(155,110,242,0.12),
        0 25px 60px rgba(0,0,0,0.85);
}

.book-image {
    position: relative;
    height: 320px;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;

    padding: 0.35rem 0.75rem;

    background: var(--gold);
    color: #000;

    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;

    border-radius: 4px;
}

.book-content {
    padding: 1.5rem;
}

.book-series {
    display: block;

    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-transform: none;

    color: color-mix(in srgb, var(--gold) 70%, var(--text) 30%);
    opacity: 0.92;

    margin-bottom: 0.35rem;
}

.book-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.7rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 1rem;
    padding-top: 1rem;

    border-top: 1px solid var(--border);

    font-size: 0.95rem;
}

.book-number {
    color: var(--muted);
    font-weight: 500;
}


.book-date {
font-size: 0.85rem;
opacity: 0.75;
font-weight: 500;
}


/* =========================================
   Dynamic Star Ratings
   ========================================= */

.book-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.star-rating {
    --percent: calc(var(--rating) / 5 * 100%);

    position: relative;
    display: inline-block;

    font-size: 0.95rem;
    line-height: 1;
    letter-spacing: 2px;
}

.star-rating::before {
    content: "★★★★★";
    color: rgba(255, 255, 255, 0.15);
}

.star-rating::after {
    content: "★★★★★";

    position: absolute;
    inset: 0;

    width: var(--percent);
    overflow: hidden;
    white-space: nowrap;

    color: var(--gold);
}

.rating-value {
    font-weight: 600;
    color: var(--gold);
}



/* =========================================
   9. Series Grid (3 Cards Across)
   ========================================= */

.series-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* =========================================
   Series Card
   ========================================= */

.series-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    cursor: pointer;

    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

[data-theme="dark"] .series-card {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 15px 40px rgba(0,0,0,0.65);
}

.series-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);

    box-shadow:
        0 0 0 1px rgba(225,194,90,0.15),
        0 0 18px rgba(225,194,90,0.10),
        0 20px 50px rgba(0,0,0,0.45);
}

[data-theme="dark"] .series-card:hover {
    box-shadow:
        0 0 0 1px rgba(225,194,90,0.18),
        0 0 28px rgba(225,194,90,0.18),
        0 0 25px rgba(155,110,242,0.12),
        0 25px 60px rgba(0,0,0,0.85);
}

/* =========================================
   SERIES SECTION - MODERN GRID LAYOUT
   ========================================= */

.series-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.series-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

/* =========================================
   IMAGE SECTION
   ========================================= */

.series-image {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.series-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.series-card:hover .series-image img {
    transform: scale(1.08);
}

.series-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        var(--bg) 0%,
        transparent 100%
    );
}

/* =========================================
   CONTENT AREA
   ========================================= */

.series-content {
    padding: 1.5rem;
}

.series-title {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.series-desc {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 1.25rem;
}

/* =========================================
   STATS ROW (BOOKS + RATING)
   ========================================= */

.series-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* shared stat block */
.series-stat {
    display: flex;
    flex-direction: column;
}

/* books */
.series-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.series-stat-label {
    font-size: 0.85rem;
    opacity: 0.75;
}

/* =========================================
   SERIES RATING (RIGHT SIDE)
   ========================================= */

.series-rating-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

/* Dynamic Goodreads Stars */

.series-rating-stat .star-rating {
    --percent: calc(var(--rating) / 5 * 100%);

    position: relative;
    display: inline-block;

    font-size: 1rem;
    line-height: 1;
    letter-spacing: 2px;

    margin-bottom: 0.35rem;
}

.series-rating-stat .star-rating::before {
    content: "★★★★★";
    color: rgba(255, 255, 255, 0.15);
}

.series-rating-stat .star-rating::after {
    content: "★★★★★";

    position: absolute;
    inset: 0;

    width: var(--percent);
    overflow: hidden;
    white-space: nowrap;

    color: var(--gold);
}

/* Rating Number + Source */

.rating-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.rating-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.rating-source {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--muted);
    opacity: 0.75;
}

/* Optional Premium Hover Effect */

.series-card:hover .star-rating::after {
    filter: drop-shadow(0 0 4px rgba(245, 179, 1, 0.35));
}

[data-theme="dark"] .series-card:hover .star-rating::after {
    filter:
        drop-shadow(0 0 6px rgba(245, 179, 1, 0.45))
        drop-shadow(0 0 12px rgba(245, 179, 1, 0.15));
}

/* =========================================
   HOVER POLISH
   ========================================= */

.series-card:hover .series-title {
    color: var(--accent);
    transition: color 0.3s ease;
}

/* =========================================
   RESPONSIVE (optional but recommended)
   ========================================= */

@media (max-width: 1024px) {
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .series-grid {
        grid-template-columns: 1fr;
    }

    .series-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .series-rating-stat {
        align-items: flex-start;
        text-align: left;
    }
}



/* =========================================
   Premium CTA Button
   ========================================= */

.series-cta {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* Main button */
.premium-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;

    padding: 1rem 2rem;
    border-radius: 999px;

    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-decoration: none;

    color: var(--text);
    background: linear-gradient(
        135deg,
        rgba(155, 110, 242, 0.15),
        rgba(225, 194, 90, 0.12)
    );

    border: 1px solid rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(12px);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.25);

    transition: all 0.35s ease;

    position: relative;
    overflow: hidden;
}

/* Glow layer */
.premium-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at center,
        rgba(225, 194, 90, 0.25),
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Hover state */
.premium-btn:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: rgba(225, 194, 90, 0.35);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(155, 110, 242, 0.25);
}

.premium-btn:hover::before {
    opacity: 1;
}

/* Icon animation */
.premium-btn-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.premium-btn:hover .premium-btn-icon {
    transform: translateX(5px);
}

/* Dark mode refinement */
[data-theme="dark"] .premium-btn {
    background: linear-gradient(
        135deg,
        rgba(155, 110, 242, 0.2),
        rgba(225, 194, 90, 0.15)
    );

    border: 1px solid rgba(255, 255, 255, 0.06);
}


/* =========================================
   SERIES INDEX PAGE
   ========================================= */

.series-index-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

/* 3 columns x however many rows needed */

.series-index-card {
    position: relative;
    min-height: 520px;

    border-radius: 24px;
    overflow: hidden;

    display: flex;
    align-items: flex-end;

    text-decoration: none;
    color: white;

    transition: transform 0.4s ease,
                box-shadow 0.4s ease,
                border-color 0.4s ease;

    box-shadow:
        0 15px 40px rgba(0,0,0,0.35);
}

/* Dark mode base */
[data-theme="dark"] .series-index-card {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 15px 40px rgba(0,0,0,0.65);
}

/* Hover lift */
.series-index-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);

    /* Subtle gold glow + depth (light mode base) */
    box-shadow:
        0 0 0 1px rgba(225,194,90,0.15),
        0 0 18px rgba(225,194,90,0.10),
        0 20px 50px rgba(0,0,0,0.45);
}

/* Dark mode premium hover glow */
[data-theme="dark"] .series-index-card:hover {
    box-shadow:
        0 0 0 1px rgba(225,194,90,0.18),
        0 0 28px rgba(225,194,90,0.18),
        0 0 25px rgba(155,110,242,0.12),
        0 25px 60px rgba(0,0,0,0.85);
}

/* =========================================
   FULL BACKGROUND IMAGE
   ========================================= */

.series-index-image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.series-index-image img {
    transition: transform 0.6s ease;
}

.series-index-card:hover .series-index-image img {
    transform: scale(1.05);
}

/* Title hover accent */
.book-card:hover .book-title,
.book-card:active .book-title,
.book-card:focus-within .book-title,
.series-card:hover .series-title,
.series-card:active .series-title,
.series-card:focus-within .series-title,
.series-index-card:hover .series-index-title,
.series-index-card:active .series-index-title,
.series-index-card:focus-within .series-index-title {
    color: var(--gold);
}

/* =========================================
   DARK GRADIENT OVERLAY
   ========================================= */

.series-index-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,0.95) 0%,
            rgba(0,0,0,0.85) 25%,
            rgba(0,0,0,0.45) 60%,
            rgba(0,0,0,0.1) 100%
        );
}

/* =========================================
   CONTENT OVER IMAGE
   ========================================= */

.series-index-content {
    position: relative;
    z-index: 3;

    width: 100%;
    padding: 2.3rem;
}

.series-index-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;

    margin-bottom: 0.75rem;
    transition: color 0.3s ease;
}

.series-index-desc {
    font-size: 1rem;
    line-height: 1.7;

    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.series-index-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 0.95rem;
}

.series-index-books {
    font-weight: 600;
}

.series-index-rating {
    color: var(--gold);
    font-weight: 700;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1100px) {
    .series-index-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .series-index-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .series-index-card {
        min-height: 460px;
    }
}



/* =========================================
SERIES UNIVERSES
========================================= */

.universe-section {
margin-bottom: 6rem;
}

.universe-header {
margin-bottom: 3rem;
text-align: center;
position: relative;
}

.universe-title {
display: inline-flex;
align-items: center;
gap: 0.75rem;

padding: 0.85rem 1.5rem;

border-radius: 999px;

background:
    linear-gradient(
        135deg,
        rgba(155,110,242,0.15),
        rgba(225,194,90,0.10)
    );

border: 1px solid rgba(255,255,255,0.06);

color: var(--gold);

box-shadow:
    0 10px 25px rgba(0,0,0,0.25),
    0 0 20px rgba(155,110,242,0.08);

position: relative;

}

/* Optional stars beside title */

.universe-title::before,
.universe-title::after {
content: "✦";

color: var(--gold);

font-size: 0.85rem;

text-shadow:
    0 0 10px rgba(212,175,55,0.5);

}

/* Celestial divider underneath */

.universe-header::after {
content: "✦ ✧ ✦";

display: block;

margin-top: 1rem;

font-size: 1rem;
letter-spacing: 1rem;

color: var(--gold);

opacity: 0.75;

text-shadow:
    0 0 8px rgba(212,175,55,0.4),
    0 0 18px rgba(155,110,242,0.25);

animation: universeTwinkle 4s ease-in-out infinite;

}

.universe-desc {
color: var(--muted);
max-width: 700px;
margin: 1rem auto 0;

font-size: 1.05rem;
line-height: 1.8;


}

/* =========================================
Celestial Animation
========================================= */

@keyframes universeTwinkle {

0%,
100% {
    opacity: 0.45;
    transform: translateY(0);
}

50% {
    opacity: 1;
    transform: translateY(-2px);
}

}

/* Dark Mode Enhancement */

[data-theme="dark"] .universe-title {
box-shadow:
0 10px 25px rgba(0,0,0,0.5),
0 0 25px rgba(155,110,242,0.12);
}



/* =========================================
   REVIEWS CAROUSEL
   ========================================= */

.reviews-section {
    padding: 6rem 0;
    position: relative;
}

/* Header */
.reviews-header {
    margin-bottom: 3rem;
    padding: 0 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Carousel Container */
.carousel-wrapper {
    position: relative;
    width: 100%;
}

/* The Track */
.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    justify-content: flex-start;
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* Review Card */
.review-card {
    flex: 0 0 auto;
    width: 350px;
    
    /* 
       IMPORTANT: 'start' alignment is required for the 
       infinite loop JS math (index * width) to work correctly. 
    */
    scroll-snap-align: center; 
    
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    
    /* Performance: Promotes layer for hover transforms */
    will-change: transform;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
}

/* Top: Stars */
.review-stars {
    display: flex;
    gap: 0.25rem;
    color: var(--gold);
}

/* Middle: Quote */
.review-text {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text);
    flex-grow: 1;
}

/* Bottom: Author */
.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}

.author-book {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    
    width: 48px;
    height: 48px;
    border-radius: 50%;
    
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    
    z-index: 10;
    transition: all 0.3s ease;
    
    /* Box shadow to lift off background */
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.carousel-btn:hover {
    background: var(--card);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }


/* Tablet: center the 350px cards */
@media (max-width: 1024px) {
  .carousel-track {
    padding-left: calc((100% - 350px) / 2);
    padding-right: calc((100% - 350px) / 2);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
.carousel-track {
    padding-left: calc((100% - max(85vw, 280px)) / 2);
    padding-right: calc((100% - max(85vw, 280px)) / 2);
  }

  /* Keep your existing mobile styles below */
  .reviews-header {
    padding: 0 1rem;
  }
  
  .review-card {
    width: 85vw;
    min-width: 280px;
  }
  
  .reviews-section {
    padding: 4rem 0;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }
  
  .carousel-btn.prev {
    left: 5px;
  }
  
  .carousel-btn.next {
    right: 5px;
  }
}


/* =========================================
   ABOUT SECTION (REDESIGNED + OPTIMIZED)
   ========================================= */

.about-row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

/* reversed layout (text left / image right flip control) */
.about-row.reverse {
    grid-template-columns: 1.2fr 1fr;
}

/* ensure mobile override is consistent */
.about-row,
.about-row.reverse {
    width: 100%;
}

/* =========================================
   MEDIA (IMAGES)
   ========================================= */

.about-media {
    width: 100%;
    position: relative;
}

/* main portrait images */
.about-media img {
    width: 100%;
    height: auto;

    /* keeps layout stable without forcing fixed heights */
    aspect-ratio: 4 / 5;
    object-fit: cover;

    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);

    display: block;

    /* performance improvements */
    content-visibility: auto;
    contain: layout paint;
}

/* hover effect (only if device supports hover) */
@media (hover: hover) {
    .about-media img {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .about-media img:hover {
        transform: translateY(-4px);
        box-shadow: 0 30px 70px rgba(0,0,0,0.4);
    }
}

/* =========================================
   TEXT STYLING
   ========================================= */

.about-content h2 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin-bottom: 1rem;
}

.about-content h3 {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    letter-spacing: 1px;
    color: var(--gold);
}

.about-content p {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1rem;
}

/* signature */
.signature {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: var(--gold);
    margin-top: 1.5rem;
}

/* =========================================
   SHARED UNIVERSE SECTION
   ========================================= */

.about-universe {
    text-align: center;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.about-universe h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.about-universe p {
    max-width: 900px;
    margin: 0 auto 1rem;
    font-size: 1.05rem;
    line-height: 1.9;
}

/* =========================================
   ABOUT GALLERY (STANDALONE SECTION)
   ========================================= */

.about-gallery-section {
    padding: 5rem 0;
}

/* 2 image horizontal layout */
.about-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;

    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* gallery images */
.about-gallery img {
    width: 100%;
    height: auto;

    aspect-ratio: 16 / 9;
    object-fit: cover;

    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);

    display: block;

    content-visibility: auto;
}

/* hover (desktop only) */
@media (hover: hover) {
    .about-gallery img {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .about-gallery img:hover {
        transform: translateY(-5px);
        box-shadow: 0 30px 70px rgba(0,0,0,0.35);
    }
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 1024px) {
    .about-row,
    .about-row.reverse {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .about-content p {
        font-size: 1rem;
        line-height: 1.8;
    }

    .about-media img {
        aspect-ratio: 3 / 4;
    }

    .about-gallery img {
        aspect-ratio: 4 / 3;
    }
}


/* =========================================
   11. Footer
   ========================================= */
footer { padding: 4rem 2rem; text-align: center; }
.footer-logo {
    font-size: 1.8rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2.25rem;
    margin: 1rem 0 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 1rem;
}

.footer-copy {
    font-size: 0.95rem;
}
.footer-links a:hover { color: var(--gold); }
.footer-social { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.social-link {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 50%;
    color: var(--muted); transition: all 0.3s ease;
}
.social-link:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }
.footer-copy { font-size: 0.875rem; color: var(--muted); opacity: 0.9; }

.footer-credit-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--muted);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-credit-link:hover {
    color: var(--gold);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.footer-credit-logo-wrap {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
    flex-shrink: 0;
}

.footer-credit-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.footer-credit-text {
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .footer-credit-link {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* =========================================
   12. Responsive
   ========================================= */
@media (max-width: 1024px) {
    .series-grid { grid-template-columns: 1fr; } 
}

/* =========================================
   SERIES TEMPLATE (Reusable for series pages)
   ========================================= */

.series-summary-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    max-width: 1100px;
    margin: 0 auto;
}

.series-summary-columns p {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem;
    line-height: 1.85;
    color: var(--text);
}

.series-books-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.series-books-title {
    font-size: clamp(2.2rem, 6vw, 3.4rem);
    font-family: 'Cinzel', serif;
    color: var(--gold);
    letter-spacing: 0.03em;
    margin-bottom: 0.65rem;
    text-shadow: 0 0 16px rgba(212, 175, 55, 0.18);
}

.series-books-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.series-book-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.series-book-item:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 14px 36px rgba(0,0,0,0.35);
}

/* Gold shimmer variant (opt-in, keeps base styles reusable elsewhere) */
.series-book-item--gold-shimmer {
    position: relative;
    border-color: rgba(243, 215, 123, 0.72);
    box-shadow:
        0 0 0 1px rgba(243, 215, 123, 0.45),
        0 0 24px rgba(212, 175, 55, 0.24),
        0 12px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    isolation: isolate;
}

.series-book-item--gold-shimmer::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        112deg,
        rgba(212, 175, 55, 0.18) 0%,
        rgba(243, 215, 123, 0.98) 42%,
        rgba(255, 245, 206, 1) 50%,
        rgba(243, 215, 123, 0.98) 58%,
        rgba(212, 175, 55, 0.18) 100%
    );
    background-size: 240% 100%;
    animation: seriesGoldShimmer 2.4s linear infinite;
    pointer-events: none;
    z-index: 0;

    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.series-book-item--gold-shimmer::after {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 28px;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 22% 20%, rgba(243, 215, 123, 0.18), transparent 55%),
        radial-gradient(circle at 78% 80%, rgba(212, 175, 55, 0.14), transparent 60%);
}

.series-book-item--gold-shimmer > * {
    position: relative;
    z-index: 1;
}

.series-book-item--gold-shimmer:hover {
    border-color: rgba(255, 245, 206, 0.9);
    box-shadow:
        0 0 0 1px rgba(255, 245, 206, 0.65),
        0 0 28px rgba(212, 175, 55, 0.32),
        0 16px 38px rgba(0,0,0,0.38);
}

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

@media (prefers-reduced-motion: reduce) {
    .series-book-item--gold-shimmer::before {
        animation: none;
        background-position: 50% 0;
    }
}

.series-book-link {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: stretch;
    color: inherit;
    text-decoration: none;
}

.series-book-cover {
    border-radius: 14px;
    overflow: hidden;
    min-height: 280px;
}

.series-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.series-book-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.series-book-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.series-book-number {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.14);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--gold);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.series-book-name {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    color: var(--text);
    line-height: 1.25;
}

.series-book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    margin-bottom: 0.8rem;
}

.series-book-meta span {
    font-size: 1rem;
    color: var(--muted);
    padding-right: 0.9rem;
    border-right: 1px solid var(--border);
}

.series-book-meta span:last-child {
    border-right: none;
    padding-right: 0;
}

.series-book-summary {
    color: var(--text);
    opacity: 0.9;
    line-height: 1.75;
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .series-summary-columns {
        grid-template-columns: 1fr;
    }

    .series-book-link {
        grid-template-columns: 1fr;
    }

    .series-book-cover {
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 1rem);
        left: 1rem;
        right: 1rem;

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;

        padding: 1.5rem;

        background: rgba(11, 7, 17, 0.96);
        backdrop-filter: blur(16px);

        border: 1px solid var(--border);
        border-radius: 20px;

        opacity: 0;
        visibility: hidden;

        transform: translateY(-10px);

        pointer-events: none;

        transition:
            opacity .3s ease,
            transform .3s ease,
            visibility .3s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;

        transform: translateY(0);

        pointer-events: auto;
    }

    .book-series {
        font-size: 0.98rem;
        margin-bottom: 0.3rem;
    }

    .book-title {
        font-size: clamp(1.5rem, 7vw, 1.85rem);
        line-height: 1.18;
    }
}
