:root {
    /* Colors */
    --color-bg-dark: #240b36; /* Dark purple */
    --color-bg-darker: #13001e; /* Very dark purple */
    --color-bg-light: #35134f; /* Lighter purple */
    --color-text-main: #ffffff; /* White */
    --color-text-muted: #d4c29c; /* Mild golden */
    --color-accent: #b09152; /* Gold */
    --color-accent-hover: #c4a96e;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2.5rem;
    --space-lg: 5rem;
    --space-xl: 8rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #0d0517, #1a0b2e, #120621, #140b2e);
    background-size: 400% 400%;
    animation: breathingMesh 20s ease infinite;
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

@keyframes breathingMesh {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Utility */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: var(--space-sm);
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: var(--space-xl) 0;
}

.dark-section {
    background-color: rgba(0, 0, 0, 0.3);
}

.grid {
    display: grid;
    gap: var(--space-md);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(26, 11, 46, 0.35);
    padding: 1.5rem 5%;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.menu-toggle span {
    width: 30px;
    height: 1px;
    background-color: var(--color-text-main);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
    filter: hue-rotate(150deg) saturate(1.2);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(13, 5, 23, 0.4), rgba(13, 5, 23, 1));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 5px;
    background: linear-gradient(to right, #ffffff, var(--color-accent), #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 5s linear infinite;
    filter: drop-shadow(0 4px 20px rgba(176, 145, 82, 0.4));
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.hero-subtitle {
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Bio Section */
.bio-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-lg);
}

.bio-description {
    font-size: 1.1rem;
    line-height: 2;
    color: var(--color-text-muted);
}

.bio-description strong {
    color: var(--color-text-main);
    font-weight: 500;
}

.portrait-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg-light);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* Library Section - Editorial Glassmorphism */
.library-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 2rem;
}

.book-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
    background-color: var(--color-bg-dark);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    cursor: pointer;
    z-index: 1;
}

.book-card:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0,0,0,0.8), 0 0 20px rgba(176, 145, 82, 0.4);
    z-index: 10;
}

.book-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    transition: background 0.5s ease, backdrop-filter 0.5s ease;
}

.book-card:hover .book-overlay {
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.book-info {
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.book-card:hover .book-info {
    transform: translateY(0);
}

.book-genre {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.5rem;
}

.book-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.book-author {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

.book-rating {
    color: var(--color-accent);
    font-size: 1rem;
    margin-bottom: 0;
}

.book-hover-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.book-card:hover .book-hover-details {
    max-height: 400px;
    opacity: 1;
    margin-top: 1rem;
}

.book-note {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Gifts Section */
.gifts-grid {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
}

.gift-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.gift-card:hover {
    border-color: rgba(176, 145, 82, 0.3);
    transform: translateY(-5px);
}

.gift-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    margin-bottom: 2rem;
    border-radius: 8px;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 2s ease forwards 1.5s;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--color-accent);
    border-radius: 14px;
    position: relative;
    margin-bottom: 10px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

.arrow-down {
    display: block;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
    transform: rotate(45deg);
    margin: -4px auto;
    animation: arrowFade 1.5s infinite;
}

.delay-arrow {
    animation-delay: 0.2s;
}

@keyframes scroll {
    0% { top: 8px; opacity: 1; }
    100% { top: 22px; opacity: 0; }
}

@keyframes arrowFade {
    0% { opacity: 0; transform: rotate(45deg) translate(-5px, -5px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(5px, 5px); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.gift-info {
    padding-right: 2rem;
}

.gift-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.gift-desc {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.gift-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
}

.gift-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

/* Buttons */
.btn-primary {
    background-color: transparent;
    color: var(--color-text-main);
    border: 1px solid var(--color-accent);
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--color-accent);
    color: var(--color-bg-darker);
}

.btn-block {
    width: 100%;
}

/* Blog Section */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.view-all {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
}

.view-all:hover {
    text-decoration: underline;
}

.blog-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.blog-post {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
}

.post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.post-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.post-title:hover {
    color: var(--color-accent);
}

.post-excerpt {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.read-more {
    font-size: 0.9rem;
    color: var(--color-text-main);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.read-more:hover {
    color: var(--color-accent);
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-desc {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

.contact-form {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text-main);
    padding: 0.5rem 0;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--color-accent);
}

/* Footer */
.footer {
    background-color: var(--color-bg-darker);
    padding: 5rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--color-text-muted);
}

.newsletter h3 {
    font-family: var(--font-body);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.newsletter p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    border-bottom: 1px solid var(--color-text-muted);
}

.newsletter-form input {
    background: transparent;
    border: none;
    color: var(--color-text-main);
    padding: 0.5rem 0;
    flex-grow: 1;
    font-family: var(--font-body);
}

.newsletter-form input:focus {
    outline: none;
}

.newsletter-form button {
    background: transparent;
    border: none;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
}

.footer-bottom {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 2rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text-main);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.filter-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-bg-dark);
    font-weight: 600;
}

/* Select Book Button */
.select-book-btn {
    display: block;
    width: 100%;
    background: rgba(176, 145, 82, 0.2);
    border: 1px solid var(--color-accent);
    color: #fff;
    padding: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.select-book-btn:hover {
    background: var(--color-accent);
    color: var(--color-bg-dark);
}

.select-book-btn.selected {
    background: var(--color-accent);
    color: var(--color-bg-dark);
    font-weight: 600;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg-dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-text-main);
    letter-spacing: 5px;
    text-transform: uppercase;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(60px); /* slightly larger sweep */
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.3s;
}

.delay-2 {
    transition-delay: 0.6s;
}

/* Responsive */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
    .bio-grid, .contact-container, .footer-content, .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .gifts-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   Shopping Cart UI & Mobile FAB
   ========================================= */

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cart-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0; right: -400px; width: 100%; max-width: 400px; height: 100vh;
    background: var(--color-bg-darker);
    z-index: 1001;
    box-shadow: -5px 0 30px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    transition: right 0.4s ease;
    border-left: 1px solid rgba(176, 145, 82, 0.2);
}
.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(176, 145, 82, 0.2);
}
.cart-header h3 {
    color: var(--color-accent);
    font-size: 1.5rem;
}
.close-cart {
    background: none; border: none;
    color: var(--color-text-main);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}
.close-cart:hover {
    color: var(--color-accent);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-bg-light);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(176, 145, 82, 0.1);
}
.cart-item-details h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}
.cart-item-details p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.remove-item {
    background: none; border: none;
    color: #E1306C;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(176, 145, 82, 0.2);
    background: var(--color-bg-dark);
}
.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

/* Mobile FAB */
.mobile-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: none;
}
@media (max-width: 768px) {
    .mobile-fab {
        display: block;
    }
}
.fab-main {
    width: 60px; height: 60px;
    background-color: var(--color-accent);
    color: var(--color-bg-darker);
    border-radius: 50%;
    border: none;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}
.fab-menu {
    position: absolute;
    bottom: 70px; right: 5px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}
.fab-menu.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.fab-item {
    width: 50px; height: 50px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}



/* =========================================
   Book Detail Modal
   ========================================= */

.book-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(13, 5, 23, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    overflow: hidden;
}

#book-modal-overlay.active .book-modal {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.book-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .book-modal-grid {
        grid-template-columns: 1fr;
        max-height: 80vh;
        overflow-y: auto;
    }
}

.book-modal-image {
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.book-modal-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.book-modal-details {
    padding: 3rem 2rem 3rem 0;
}

@media (max-width: 768px) {
    .book-modal-details {
        padding: 1rem 2rem 3rem 2rem;
    }
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.close-modal-btn:hover {
    color: var(--color-accent);
}



/* Minimalist Book Card Badges */
.book-rating-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid rgba(176, 145, 82, 0.5);
    z-index: 5;
    pointer-events: none;
}


/* ======================================================= */
/* PROMO BADGE AND MODAL STYLING                           */
/* ======================================================= */

#promo-popup-badge, #promo-modal-overlay, #promo-modal-overlay * {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Floating badge on the bottom left */
#promo-popup-badge {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, rgba(30, 19, 48, 0.9), rgba(15, 8, 29, 0.9));
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(176, 145, 82, 0.4);
  z-index: 99999;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { box-shadow: 0 0 0 0 rgba(176, 145, 82, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(176, 145, 82, 0); }
  100% { box-shadow: 0 0 0 0 rgba(176, 145, 82, 0); }
}

#promo-popup-badge:hover {
  transform: scale(1.1) translateY(-5px);
  background: rgba(30, 19, 48, 1);
}

/* Dimmed background overlay */
#promo-modal-overlay {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
}

/* Circular pop-up window configured to contrast on dark purple */
#promo-modal-content {
  position: fixed;
  bottom: 100px;
  left: 30px;
  width: 320px;
  height: 320px;
  background: linear-gradient(145deg, rgba(25, 15, 40, 0.95), rgba(10, 5, 20, 0.98));
  border-radius: 50%;
  padding: 40px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8), inset 0 0 20px rgba(176, 145, 82, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px solid var(--color-accent);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.promo-modal-body {
  width: 100%;
}

.promo-icon-header {
  font-size: 34px;
  margin-bottom: 8px;
  color: var(--color-accent);
  filter: drop-shadow(0 0 8px rgba(176, 145, 82, 0.6));
}

#promo-modal-content h2 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  color: var(--color-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#promo-modal-content p {
  margin: 0 0 18px 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

/* Action button */
.promo-modal-btn {
  background: var(--gradient-primary);
  color: #0f081d;
  border: none;
  padding: 10px 22px;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.promo-modal-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(176, 145, 82, 0.4);
}

/* Circular Outline Close Button optimized for dark backgrounds */
#promo-modal-close {
  position: absolute;
  top: 25px;
  right: 35px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: all 0.3s ease;
}

#promo-modal-close:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: rgba(176, 145, 82, 0.1);
  transform: rotate(90deg);
}

@keyframes popIn {
  0% { transform: scale(0) translate(-100px, 100px); opacity: 0; }
  60% { transform: scale(1.05) translate(0, 0); opacity: 1; }
  100% { transform: scale(1) translate(0, 0); opacity: 1; }
}

/* Responsive hidden control */
@media (max-width: 768px) {
  #promo-popup-badge, #promo-modal-overlay {
    display: none !important;
  }
}
