:root {
    /* Color Palette - Premium Dark Mode */
    --bg-dark: #0a0a0c;
    --bg-surface: #151518;
    --bg-surface-light: #202025;
    
    --accent-gold: #d4af37;
    --accent-gold-glow: rgba(212, 175, 55, 0.3);
    
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    
    --glass-bg: rgba(21, 21, 24, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --whatsapp-green: #25D366;
    
    /* Typography */
    --font-ui: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(212,175,55,0.15) 0%, rgba(10,10,12,0) 70%);
}

.shape-2 {
    bottom: 20%;
    right: -5%;
    width: 30vw;
    height: 30vw;
    background: radial-gradient(circle, rgba(100,50,200,0.1) 0%, rgba(10,10,12,0) 70%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.2;
}

h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    outline: none;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background-color: var(--accent-gold);
    box-shadow: 0 10px 20px var(--accent-gold-glow);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    transition: var(--transition-smooth);
}

.btn-outline:hover::before {
    left: 100%;
    transition: 0.7s ease-in-out;
}

.btn-outline:hover {
    border-color: var(--accent-gold);
    color: var(--bg-dark);
    background: var(--accent-gold);
    box-shadow: 0 0 15px var(--accent-gold-glow);
}

/* Pulsing Buy Button */
.buy-btn {
    animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

.whatsapp-btn {
    background-color: var(--whatsapp-green);
    color: #fff;
}
.whatsapp-btn:hover {
    background-color: #20b858;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--accent-gold);
}





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

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-image {
    perspective: 1000px;
}

.glass-book-mockup {
    width: 100%;
    max-width: 400px;
    height: 550px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: var(--transition-smooth);
    box-shadow: -20px 20px 40px rgba(0,0,0,0.5);
    animation: float 6s ease-in-out infinite;
}

.glass-book-mockup:hover {
    transform: rotateY(-5deg) rotateX(2deg);
}

.book-cover {
    text-align: center;
    color: var(--accent-gold);
}

.book-cover i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.book-cover h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-primary);
}

@keyframes float {
    0% { transform: rotateY(-15deg) rotateX(5deg) translateY(0px); }
    50% { transform: rotateY(-15deg) rotateX(5deg) translateY(-20px); }
    100% { transform: rotateY(-15deg) rotateX(5deg) translateY(0px); }
}

/* Library Section */
.library {
    padding: 8rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.book-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--accent-gold);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 20px rgba(212, 175, 55, 0.15);
}

.book-image {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-surface-light);
}

.book-placeholder {
    width: 180px;
    height: 260px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5);
    transition: var(--transition-smooth);
}

.book-cover-img {
    width: 180px;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5);
    transition: var(--transition-smooth);
}

.book-placeholder i {
    font-size: 3.5rem;
    color: rgba(255,255,255,0.8);
}

/* 3D Flip Card Effect */
.book-flip-container {
    perspective: 1000px;
    width: 180px;
    height: 260px;
}

.book-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

.book-card:hover .book-flipper,
.book-flipper.flipped {
    transform: rotateY(180deg) scale(1.05);
}

.book-front, .book-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}

.book-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.book-front .book-placeholder,
.book-front .book-cover-img {
    box-shadow: none; /* Shadow moved to front/back wrappers */
}

.book-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.2rem;
    text-align: center;
    color: #f5f5f7;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.book-back::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
    pointer-events: none;
}

.book-back h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--accent-gold);
}

.book-back p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.book-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.book-info p {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-surface);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
}

.footer-logo span {
    color: var(--accent-gold);
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface-light);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: var(--accent-gold);
    color: var(--bg-dark);
    transform: translateY(-3px);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* Payment Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 1rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal.active {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
    pointer-events: auto !important;
    z-index: 999999 !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(5px);
    z-index: 0;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    margin: auto;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    z-index: 1001;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition-smooth);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

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

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.highlight-text {
    color: var(--accent-gold);
    font-weight: 500;
    font-size: 1.1rem;
}

.payment-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.step {
    display: flex;
    gap: 1rem;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-surface-light);
    color: var(--accent-gold);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.step-content h4 {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.step-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.upi-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#upi-id {
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    color: var(--text-primary);
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: #fff;
    color: #000;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
}

.qr-placeholder i {
    font-size: 4rem;
}

.qr-placeholder span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    
    
    .glass-book-mockup {
        height: 400px;
    }
}

/* Additional Sections */
.about, .testimonials {
    padding: 6rem 0;
}

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

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    height: 70px;
    width: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-light);
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

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

.testimonial-card {
    background: var(--bg-surface-light);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    position: relative;
}

.stars {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.testimonial-card h4 {
    font-family: var(--font-ui);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Updated QR Image styling */
.payment-qr {
    max-width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    margin-bottom: 0.5rem;
}

/* Realistic 3D Book Styles */
.book-3d-container {
    perspective: 1500px;
    width: 180px;
    height: 260px;
    margin: 0 auto;
}

.book-3d {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5); /* Shadow on the whole object */
}

.book-card:hover .book-3d {
    transform: rotateY(-180deg) scale(1.05);
    box-shadow: -10px 10px 30px rgba(0,0,0,0.5);
}

.book-face {
    position: absolute;
    backface-visibility: hidden; /* Or visible if we want a solid block, but hidden is safer */
    -webkit-backface-visibility: hidden;
}

/* Front and Back */
.book-front, .book-back {
    width: 180px;
    height: 260px;
    border-radius: 3px 6px 6px 3px;
    box-shadow: inset 4px 0 10px rgba(0, 0, 0, 0.1); /* Hinge shadow */
}

.book-front {
    transform: translateZ(15px);
    background-color: var(--bg-surface-light);
}

.book-back {
    transform: rotateY(180deg) translateZ(15px);
    border-radius: 6px 3px 3px 6px;
    box-shadow: inset -4px 0 10px rgba(0, 0, 0, 0.1);
}

/* Spine (Left) */
.book-left {
    width: 30px;
    height: 260px;
    left: 75px; /* Center horizontally (180 - 30)/2 */
    transform: rotateY(-90deg) translateZ(90px);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

/* Pages (Right, Top, Bottom) */
.book-right {
    width: 30px;
    height: 256px;
    left: 75px;
    top: 2px; /* Slightly inset from cover */
    transform: rotateY(90deg) translateZ(88px);
    background: #fcf9f2;
    background-image: repeating-linear-gradient(to right, transparent 0, transparent 2px, rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 3px);
}

.book-top {
    width: 176px;
    height: 30px;
    top: 115px; /* (260 - 30)/2 */
    left: 2px;
    transform: rotateX(90deg) translateZ(128px);
    background: #fcf9f2;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 3px);
}

.book-bottom {
    width: 176px;
    height: 30px;
    top: 115px;
    left: 2px;
    transform: rotateX(-90deg) translateZ(128px);
    background: #fcf9f2;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 3px);
}

.back-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 1rem;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.back-content h4 {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    letter-spacing: 1px;
}

.back-content p {
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
    font-style: italic;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 2.5rem auto 0;
    position: relative;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface-light);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.search-wrapper:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 15px var(--accent-gold-glow);
    background: var(--bg-surface);
}

.search-icon {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-right: 1rem;
    transition: var(--transition-smooth);
}

.search-wrapper:focus-within .search-icon {
    color: var(--accent-gold);
}

#knowledge-search {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-ui);
    padding: 0.8rem 0;
}

#knowledge-search::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 4rem 0;
    width: 100%;
    color: var(--text-secondary);
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    color: var(--glass-border);
}

.footer-btn {
    display: inline-block;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-size: 1.1rem !important;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem !important;
    padding: 0.6rem 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease !important;
}

.footer-btn:hover {
    color: var(--accent-gold) !important;
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
}


/* Mobile Menu Styles */
.hamburger { display: block;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 101;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    header nav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 12, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid var(--glass-border);
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }

    header nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    
    
    #nav-login-btn {
        margin-left: 0 !important;
        margin-top: 1rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
}


/* Privacy & Anti-Copy Deterrents */
body {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

/* Hide content when printing */
@media print {
    body {
        display: none !important;
    }
}


/* Admin Portal Mobile Responsiveness */
.admin-table-container {
    overflow-x: auto;
    width: 100%;
}
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.admin-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .admin-modal-grid {
        grid-template-columns: 1fr;
    }
    /* Make table buttons stack on mobile for easier tapping */
    .admin-table-container table td button {
        margin-bottom: 0.5rem;
        width: 100%;
    }
}

header nav {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
}
header nav.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
header nav a {
    margin-left: 0 !important;
    font-size: 1.2rem !important;
}

/* --- PREMIUM SIDE DRAWER NAVIGATION --- */
header nav {
    display: none !important; /* Hide old inline top nav entirely */
}

.hamburger {
    display: block !important; /* Always show hamburger now */
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#side-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    width: 320px;
    height: 100vh;
    background: rgba(18, 18, 25, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid var(--glass-border);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    padding: 3rem 2rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

#side-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.drawer-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.drawer-close:hover {
    color: var(--text-primary);
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.drawer-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s;
    font-family: var(--font-heading);
}

.drawer-nav a:hover {
    color: var(--accent-gold);
}

.drawer-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- PREMIUM MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    /* General Typography & Spacing */
    h1 {
        font-size: 2.4rem !important;
        line-height: 1.2 !important;
        letter-spacing: -0.5px;
    }
    h2 {
        font-size: 2rem !important;
    }
    p {
        font-size: 1rem !important;
        line-height: 1.6;
    }
    
    /* Layout */
    .container {
        padding: 0 1.5rem !important;
    }
    
    section {
        padding: 4rem 0 !important;
    }
    
    /* Hero Section */
    .hero {
        padding-top: 8rem !important;
    }
    .hero-content h1 {
        font-size: 2.8rem !important;
    }
    
    /* Buttons */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    .hero-buttons .btn {
        width: 100%;
        margin: 0 !important;
        justify-content: center;
        padding: 15px 24px;
        font-size: 1.1rem;
    }
    
    /* Book Grid */
    .book-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
        padding: 1rem;
    }
    
    .book-card {
        margin: 0 auto;
        max-width: 320px;
        width: 100%;
    }
    
    /* Drawer Menu Premium Adjustments */
    #side-drawer {
        width: 85vw !important; 
        max-width: 350px;
        padding: 2.5rem 1.5rem !important;
    }
    .drawer-nav a {
        font-size: 1.4rem !important;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        display: block;
    }
    
    /* Modal premium adjustments for mobile */
    .modal-content {
        padding: 2rem 1.5rem !important;
        width: 95% !important;
        border-radius: 20px !important;
    }
}

/* Reading Streak & Loyalty Rewards Styling */
.gamification-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.streak-card, .reward-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.streak-card:hover, .reward-card:hover {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

.streak-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.flame-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 1.5rem;
    animation: flamePulse 2s infinite ease-in-out;
}

@keyframes flamePulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }
    50% { transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.8)); }
}

.reward-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
    border: 1px solid var(--glass-border);
}

.reward-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, var(--accent-gold));
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
}

.btn-claim-free {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
    animation: pulseClaim 2s infinite ease-in-out;
}

@keyframes pulseClaim {
    0%, 100% { box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(16, 185, 129, 0.7); }
}

/* Mystery Box Unboxing Modal Styling */
.mystery-box-wrapper {
    text-align: center;
    padding: 2.5rem 1rem;
    cursor: pointer;
    user-select: none;
}

.mystery-box-3d {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    border-radius: 24px;
    background: linear-gradient(135deg, #d4af37 0%, #f59e0b 50%, #b45309 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mystery-box-3d:hover {
    transform: scale(1.08) rotate(3deg);
}

.mystery-box-3d.shake-box {
    animation: boxFloatShake 2.5s infinite ease-in-out;
}

@keyframes boxFloatShake {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    20% { transform: translateY(-8px) rotate(-4deg); }
    40% { transform: translateY(-4px) rotate(4deg); }
    60% { transform: translateY(-8px) rotate(-2deg); }
    80% { transform: translateY(-2px) rotate(2deg); }
}

.mystery-gift-icon {
    font-size: 4rem;
    color: #ffffff;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    animation: giftGlow 2s infinite ease-in-out;
}

@keyframes giftGlow {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9)); }
}

.mystery-box-3d.opening {
    animation: boxOpenBurst 1.2s forwards ease-in-out !important;
}

@keyframes boxOpenBurst {
    0% { transform: scale(1) rotate(0deg); }
    30% { transform: scale(1.3) rotate(-15deg); }
    60% { transform: scale(1.4) rotate(15deg); filter: brightness(1.8) drop-shadow(0 0 40px #f59e0b); }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.mystery-instruction {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.reward-counter-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    color: #f59e0b;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Executive Certificate Styling (Apple/Microsoft Style) */
.certificate-paper {
    background: linear-gradient(135deg, #111116 0%, #1a1a24 50%, #0d0d12 100%);
    border: 3px solid var(--accent-gold);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), inset 0 0 40px rgba(212, 175, 55, 0.15);
    color: var(--text-primary);
    overflow: hidden;
}

.certificate-paper::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    pointer-events: none;
}

.certificate-paper::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    bottom: 16px;
    border: 1px dashed rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    pointer-events: none;
}

.certificate-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 15rem;
    color: rgba(251, 191, 36, 0.03);
    pointer-events: none;
    user-select: none;
}

.certificate-header-crest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(245,158,11,0.05) 100%);
    border: 1px solid var(--accent-gold);
    border-radius: 40px;
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.certificate-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #fbbf24 0%, #d4af37 50%, #fef3c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
}

.certificate-subtitle {
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.certificate-recipient-name {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: #ffffff;
    margin: 0.5rem 0;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.certificate-book-showcase {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.certificate-book-cover {
    width: 75px;
    height: 105px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.certificate-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.certificate-seal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 30px;
    color: #fbbf24;
    font-size: 0.8rem;
    font-weight: 600;
}

@media print {
    @page {
        size: landscape;
        margin: 0;
    }
    html, body {
        background-color: #0d0d12 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .certificate-paper {
        background: #111116 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        border: 3px solid #d4af37 !important;
        box-shadow: none !important;
        margin: 0 auto !important;
        padding: 2.5rem !important;
    }
    .certificate-paper * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .certificate-title {
        color: #fbbf24 !important;
        -webkit-text-fill-color: #fbbf24 !important;
    }
    .no-print, header, footer, aside, nav, button, .close-modal, .modal-overlay {
        display: none !important;
    }
}

/* --- EXECUTIVE CERTIFICATE STYLING --- */
.certificate-paper {
    background: linear-gradient(135deg, #0f111a 0%, #08090e 100%);
    border: 3px double var(--accent-gold);
    border-radius: 16px;
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), inset 0 0 50px rgba(212, 175, 55, 0.05);
    margin: 0 auto;
    overflow: hidden;
}

.certificate-paper::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    pointer-events: none;
}

.certificate-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-family: var(--font-heading);
    font-size: 7rem;
    font-weight: 700;
    color: rgba(212, 175, 55, 0.03);
    letter-spacing: 12px;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
}

.certificate-header-crest {
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: var(--accent-gold);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.certificate-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: #ffffff;
    letter-spacing: 1.5px;
    margin-bottom: 0.2rem;
}

.certificate-subtitle {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.certificate-recipient-name {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin: 0.5rem 0 1.2rem;
    font-style: italic;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.certificate-book-showcase {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    max-width: 580px;
    margin: 1.5rem auto;
    text-align: left;
}

.certificate-book-cover {
    width: 65px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--accent-gold);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.certificate-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 1rem;
}

.certificate-seal-badge {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.05) 100%);
    border: 1px solid var(--accent-gold);
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
    color: var(--accent-gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}



