/* =============================
   ROOT VARIABLES & RESET
   ============================= */
:root {
    /* Color Palette */
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #818CF8;
    --secondary: #EC4899;
    --secondary-dark: #DB2777;
    --accent: #F59E0B;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    --gradient-secondary: linear-gradient(135deg, #F093FB 0%, #F5576C 100%);
    --gradient-accent: linear-gradient(135deg, #4FACFE 0%, #00F2FE 100%);
    --gradient-dark: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    
    /* Neutral Colors */
    --dark: #0F172A;
    --dark-light: #1E293B;
    --gray: #64748B;
    --gray-light: #CBD5E1;
    --gray-lighter: #F1F5F9;
    --white: #FFFFFF;
    
    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-display: 'Playfair Display', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* =============================
   NAVIGATION
   ============================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.logo i {
    font-size: 1.75rem;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-lighter);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar i {
    font-size: 2rem;
    color: var(--primary);
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.dropdown-toggle:hover {
    background: var(--gray-lighter);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.dropdown-menu a:hover {
    background: var(--gray-lighter);
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* =============================
   BUTTONS
   ============================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* =============================
   HERO SECTION
   ============================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.9) 0%, 
        rgba(118, 75, 162, 0.9) 50%,
        rgba(236, 72, 153, 0.9) 100%
    );
    background-size: 400% 400%;
    animation: gradientWave 8s ease-in-out infinite;
}

@keyframes gradientWave {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 25%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 75%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.floating-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    animation: float 15s infinite ease-in-out;
    backdrop-filter: blur(80px);
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(253, 224, 71, 0.3) 0%, transparent 70%);
    top: 60%;
    right: 20%;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(252, 165, 165, 0.3) 0%, transparent 70%);
    bottom: 20%;
    left: 60%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1) rotate(0deg); 
    }
    25% {
        transform: translate(40px, -40px) scale(1.1) rotate(90deg);
    }
    50% {
        transform: translate(-20px, 40px) scale(0.9) rotate(180deg);
    }
    75% {
        transform: translate(-40px, -20px) scale(1.05) rotate(270deg);
    }
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
}

.gradient-text {
    background: linear-gradient(135deg, #FDE68A 0%, #FCA5A5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-showcase {
    perspective: 1000px;
}

.book-3d {
    width: 400px;
    height: 550px;
    position: relative;
    animation: bookFloat 6s ease-in-out infinite;
}

.book-cover-3d {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-radius: var(--radius-lg);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    transform-style: preserve-3d;
    transition: transform var(--transition-slow);
}

.book-cover-3d::before {
    content: '';
    position: absolute;
    inset: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
}

.book-cover-3d::after {
    content: 'ARCHAZZ';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-display);
    letter-spacing: 0.5rem;
}

@keyframes bookFloat {
    0%, 100% { transform: translateY(0) rotateY(-15deg); }
    50% { transform: translateY(-20px) rotateY(-10deg); }
}

/* =============================
   SECTIONS
   ============================= */
.books-section,
.about-section {
    padding: 6rem 2rem;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

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

.section-title {
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-display);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray);
}

/* =============================
   BOOK CARDS
   ============================= */
.books-controls {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar i {
    position: absolute;
    left: 1.25rem;
    color: var(--gray);
    font-size: 1.125rem;
}

.search-bar input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.genre-filter {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 200px;
}

.genre-filter i {
    position: absolute;
    left: 1.25rem;
    color: var(--gray);
    font-size: 1.125rem;
    pointer-events: none;
    z-index: 1;
}

.genre-filter select {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.genre-filter select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.genre-filter select:hover {
    border-color: var(--primary-light);
}

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

.book-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.book-cover-container {
    position: relative;
    width: 100%;
    padding-top: 140%;
    overflow: hidden;
    background: var(--gradient-dark);
}

.book-cover-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.book-card:hover .book-cover-container img {
    transform: scale(1.1);
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.book-author {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.book-preview {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-lighter);
}

.book-date {
    font-size: 0.75rem;
    color: var(--gray);
}

.genre-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.book-pages {
    font-size: 0.75rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* =============================
   ABOUT SECTION
   ============================= */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.features-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    display: flex;
    gap: 1.5rem;
}

.feature-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 0;
}

.about-image {
    position: relative;
}

.image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* =============================
   FOOTER
   ============================= */
.footer {
    background: var(--gradient-dark);
    color: white;
    padding: 3rem 2rem 1.5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    opacity: 0.8;
}

.footer-section a {
    display: block;
    color: white;
    text-decoration: none;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    opacity: 0.6;
}

/* =============================
   MODALS
   ============================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: 0;
    display: block;
    overflow-y: auto;
    text-align: center;
}

/* Helper to center content vertically */
.modal::before {
    content: "";
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -0.25em;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

/* Helper to center the content */
.modal::before {
    content: "";
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -0.25em;
}

@media (max-width: 768px) {
    .modal {
        padding: 0;
    }
    
    .modal-content {
         padding: 1.5rem;
         width: 95%; /* ensure some margin on sides */
         margin: 2rem 0; /* Vertical margin to allow scrolling */
    }
}

.modal-content {
    display: inline-block;
    vertical-align: middle;
    text-align: left;
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    /* Remove max-height and internal scroll, let the page scroll */
    margin: 2rem auto;
}

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

.modal-large {
    max-width: 900px;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--gray-lighter);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-light);
    transform: rotate(90deg);
}

.modal-content h2 {
    font-size: 2rem;
    font-family: var(--font-display);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--gray);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--gray);
}

.modal-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* Book Details Modal */
.book-details {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

.book-details-cover img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.book-details-info h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.book-meta {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    color: var(--gray);
}

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

.book-preview {
    margin: 2rem 0;
}

.book-preview h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.book-preview p {
    color: var(--gray);
    line-height: 1.8;
}

/* =============================
   RESPONSIVE DESIGN
   ============================= */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-visual {
        margin-top: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .book-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-container {
        padding: 1rem 1.25rem;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        gap: 1rem;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 80px 0 3rem;
    }
    
    .hero-content {
        padding: 2rem 1.25rem;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .book-3d {
        width: 280px;
        height: 380px;
    }
    
    .book-cover-3d::after {
        font-size: 2rem;
        letter-spacing: 0.3rem;
    }
    
    /* Sections */
    .books-section,
    .about-section {
        padding: 3rem 1.25rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Book Controls */
    .books-controls {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .search-bar {
        min-width: 100%;
    }
    
    .search-bar input,
    .genre-filter select {
        padding: 0.875rem 1rem 0.875rem 3rem;
        font-size: 0.9375rem;
    }
    
    .genre-filter {
        min-width: 100%;
    }
    
    /* Books Grid */
    .books-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* About Section */
    .about-content {
        gap: 2rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .features-grid {
        gap: 1.5rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 1.25rem 1.25rem;
    }
    
    .footer-content {
        gap: 2rem;
    }
    
    /* Modal */
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        padding: 2rem 1.5rem;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
    
    .book-details-info h2 {
        font-size: 1.75rem;
    }
    
    .book-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Small Mobile Devices (Vivo Y15 and similar) */
@media (max-width: 480px) {
    /* Typography */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Spacing */
    .hero-content {
        padding: 1.5rem 1rem;
    }
    
    .books-section,
    .about-section {
        padding: 2rem 1rem;
    }
    
    .nav-container {
        padding: 0.875rem 1rem;
    }
    
    /* Logo */
    .logo {
        font-size: 1.25rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    /* Hero Stats */
    .hero-stats {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* 3D Book */
    .book-3d {
        width: 240px;
        height: 330px;
    }
    
    .book-cover-3d::after {
        font-size: 1.5rem;
        letter-spacing: 0.25rem;
    }
    
    /* Search & Filter */
    .search-bar input,
    .genre-filter select {
        padding: 0.75rem 0.875rem 0.75rem 2.75rem;
        font-size: 0.875rem;
    }
    
    .search-bar i,
    .genre-filter i {
        left: 1rem;
        font-size: 1rem;
    }
    
    /* Book Cards */
    .book-info {
        padding: 1.25rem;
    }
    
    .book-title {
        font-size: 1.125rem;
    }
    
    /* Features */
    .feature-card {
        gap: 1rem;
    }
    
    .feature-icon {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }
    
    .feature-card h3 {
        font-size: 1.125rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 1.5rem 1.25rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 1rem 1rem;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.375rem;
    }
    
    .book-3d {
        width: 200px;
        height: 280px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* =============================
   ANIMATIONS
   ============================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================
   NOTIFICATION BANNER
   ============================= */
.notification-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1rem;
    display: flex; /* Changed from 'none' to flex via JS */
    align-items: center;
    justify-content: space-between;
    z-index: 9000;
    gap: 1rem;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-text h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.125rem;
    line-height: 1.2;
}

.notification-text p {
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.2;
    margin: 0;
}

.notification-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
    width: 100%;
    justify-content: center;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, 100px);
        opacity: 0;
    }
}

.notification-banner.hiding {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: none;
}
