/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B35;
    --secondary: #4ECDC4;
    --accent: #FFD93D;
    --dark: #2C3E50;
    --light: #ECF0F1;
    --success: #27AE60;
    --danger: #E74C3C;
    --warning: #F39C12;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-orange: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
}

body {
    font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #f8f9fa;
}

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

/* Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

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

.nav-icon {
    position: relative;
    color: var(--dark);
    font-size: 1.3rem;
    padding: 0.5rem;
}

.nav-icon .badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* Buttons */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-size: 0.95rem;
    white-space: nowrap;
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

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

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

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 0.5rem;
    min-width: 200px;
    display: none;
    margin-top: 0.5rem;
}

.user-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: var(--light);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    background: none;
    border: none;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1999;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Premium Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fef9f3 30%, #faf5f0 60%, #f5f0eb 100%);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    transition: left 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2000;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 10px;
    padding-bottom: 10px;
    box-sizing: border-box;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 248, 240, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(250, 245, 235, 0.4) 0%, transparent 50%);
    pointer-events: none;
    opacity: 1;
    animation: backgroundPulse 8s ease-in-out infinite;
}

.mobile-menu::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 60% 40%, rgba(255, 250, 245, 0.5) 0%, transparent 40%),
        radial-gradient(circle at 30% 80%, rgba(248, 243, 238, 0.4) 0%, transparent 45%);
    pointer-events: none;
    opacity: 0;
    animation: backgroundFloat 12s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes backgroundFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    25% {
        opacity: 0.6;
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        opacity: 0.4;
        transform: translateY(-10px) translateX(-15px);
    }
    75% {
        opacity: 0.7;
        transform: translateY(-30px) translateX(5px);
    }
}

.mobile-menu-content {
    padding: 0;
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
}

/* Premium Close Button */
.close-menu {
    background: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: #2c3e50;
    transition: all 0.25s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.close-menu:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.15);
}

.close-menu:active {
    transform: rotate(90deg) scale(0.92);
}

/* User Profile Section */
.mobile-menu-header {
    padding: 1rem 1.5rem 1rem;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0.5rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mobile-menu-user-section {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0.5rem;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s ease;
    flex: 1;
    min-width: 0;
}

.mobile-menu-logo:hover {
    opacity: 0.8;
}

.mobile-menu-logo i {
    font-size: 1.8rem;
    color: #667eea;
    flex-shrink: 0;
}

.mobile-menu-logo span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-logo-img {
    height: 45px;
    max-width: 180px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Contact Information Section */
.mobile-menu-contact {
    padding: 0.6rem 1.5rem 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.mobile-menu-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #5a6c7d;
    font-size: 0.85rem;
    line-height: 1.4;
}

.mobile-menu-contact-item:first-child {
    padding-top: 0;
}

.mobile-menu-contact-item:last-child {
    padding-bottom: 0;
}

.mobile-menu-contact-item i {
    color: #667eea;
    font-size: 1rem;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-contact-item span {
    flex: 1;
    color: #5a6c7d;
}

.mobile-menu-contact-item a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.mobile-menu-contact-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.mobile-menu-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.mobile-menu-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    border: 2.5px solid rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mobile-menu-user-info {
    flex: 1;
    min-width: 0;
}

.mobile-menu-user-name {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-menu-user-email {
    color: #5a6c7d;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Menu Navigation */
.mobile-menu-nav {
    flex: 1;
    padding: 0.5rem 1.5rem 0.25rem;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu li {
    margin-bottom: 0.65rem;
    animation: slideInLeft 0.35s ease backwards;
}

.mobile-menu li:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu li:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu li:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu li:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu li:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu li:nth-child(6) { animation-delay: 0.3s; }
.mobile-menu li:nth-child(7) { animation-delay: 0.35s; }
.mobile-menu li:nth-child(8) { animation-delay: 0.4s; }
.mobile-menu li:nth-child(9) { animation-delay: 0.45s; }
.mobile-menu li:nth-child(10) { animation-delay: 0.5s; }

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.1rem 1.35rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mobile-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s ease;
}

.mobile-menu a:hover::before {
    left: 100%;
}

.mobile-menu a:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.mobile-menu a:active {
    transform: translateX(6px) scale(0.97);
}

.mobile-menu a i {
    font-size: 1.25rem;
    width: 26px;
    text-align: center;
    flex-shrink: 0;
    color: #667eea;
    transition: color 0.25s ease;
}

.mobile-menu a:hover i {
    color: #764ba2;
}

/* Ensure Sign Up button icon is white */
.mobile-menu-footer .btn-primary i,
.mobile-menu-footer .btn-primary:hover i {
    color: white !important;
}

.mobile-menu a span {
    flex: 1;
}

/* Menu Footer */
.mobile-menu-footer {
    padding: 0.75rem 1.5rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-top: 0.25rem;
    margin-bottom: 10px;
    position: sticky;
    bottom: 0;
}

.mobile-menu-footer .btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.mobile-menu-footer .btn-primary {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    margin-bottom: 0.6rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    border: none;
}

.mobile-menu-footer .btn-primary i {
    color: white !important;
}

.mobile-menu-footer .btn-primary:hover {
    background: linear-gradient(135deg, #FF8C42, #FFA366);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.mobile-menu-footer .btn-primary:hover i {
    color: white !important;
}

.mobile-menu-footer .btn-outline {
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-menu-footer .btn-outline:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(102, 126, 234, 0.5);
    color: #764ba2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-25px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scrollbar Styling for Mobile Menu */
.mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Mobile Menu - Only show on mobile devices */
@media (min-width: 769px) {
    .mobile-menu-btn,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    /* Adjust menu width for smaller screens */
    .mobile-menu {
        width: 80%;
        max-width: 320px;
    }
    
    .mobile-menu-header {
        padding: 1.5rem 1.25rem 1rem;
    }
    
    .mobile-menu-logo {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
    
    .mobile-menu-nav {
        padding: 0 1.25rem 0.15rem;
    }
    
    .mobile-menu a {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    .mobile-menu-contact {
        padding: 0.5rem 1.25rem 0.6rem;
        margin-top: 0.15rem;
        margin-bottom: 0.15rem;
    }
    
    .mobile-menu-contact-item {
        padding: 0.4rem 0;
        font-size: 0.8rem;
    }
    
    .mobile-menu-footer {
        padding: 0.6rem 1.25rem 0.85rem;
        margin-top: 0.15rem;
    }
    
    .mobile-menu-footer .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .mobile-menu-footer .btn-primary {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 85%;
        max-width: 300px;
    }
    
    .mobile-menu-header {
        padding: 1.25rem 1rem 0.75rem;
        margin-top: 2rem;
    }
    
    .mobile-menu-logo {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }
    
    .mobile-menu-user {
        padding: 0.75rem;
    }
    
    .mobile-menu-user-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .mobile-menu-user-name {
        font-size: 0.95rem;
    }
    
    .mobile-menu-user-email {
        font-size: 0.8rem;
    }
    
    .mobile-menu-nav {
        padding: 0 1rem 0.1rem;
    }
    
    .mobile-menu a {
        padding: 0.8rem 0.85rem;
        font-size: 0.85rem;
    }
    
    .mobile-menu-contact {
        padding: 0.45rem 1rem 0.5rem;
        margin-top: 0.1rem;
        margin-bottom: 0.1rem;
    }
    
    .mobile-menu-contact-item {
        padding: 0.35rem 0;
        font-size: 0.75rem;
    }
    
    .mobile-menu-contact-item i {
        font-size: 0.9rem;
        width: 16px;
    }
    
    .mobile-menu-footer {
        padding: 0.5rem 1rem 0.75rem;
        margin-top: 0.1rem;
    }
    
    .mobile-menu-footer .btn {
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
    
    .mobile-menu-footer .btn-primary {
        margin-bottom: 0.45rem;
    }
    
    .close-menu {
        top: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
}

/* Hero Section */
.hero {
    background: var(--gradient);
    padding: 5rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

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

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
}

/* Features */
.features {
    padding: 4rem 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: var(--light);
    transition: all 0.3s;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Books Section */
.books-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

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

.book-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.08),
        0 0 0 2px rgba(255, 255, 255, 1),
        0 0 0 3px rgba(102, 126, 234, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-clip: padding-box;
}

/* Premium Gradient Border Effect */
.book-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.3) 0%, 
        rgba(118, 75, 162, 0.3) 50%,
        rgba(255, 107, 53, 0.2) 100%);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: -1;
    transition: all 0.4s ease;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.2),
        0 0 0 2px rgba(255, 255, 255, 1),
        0 0 0 4px rgba(102, 126, 234, 0.3);
}

.book-card:hover::before {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.6) 0%, 
        rgba(118, 75, 162, 0.6) 50%,
        rgba(255, 107, 53, 0.5) 100%);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.book-cover-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.book-cover {
    position: relative;
    overflow: hidden;
    padding-top: 140%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.book-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.book-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #F7931E 100%);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    z-index: 2;
    letter-spacing: 0.3px;
}

.book-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(250, 251, 252, 0.95));
}

.book-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #2C3E50 0%, #34495e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: 2.8rem;
    letter-spacing: -0.2px;
}

.book-author {
    color: #5a6c7d;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.current-price {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.original-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 500;
}

.discount {
    background: linear-gradient(135deg, #27AE60 0%, #229954 100%);
    color: white;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
}

.book-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-actions .btn-outline {
    border: 2px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.book-actions .btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.book-actions .btn-outline:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.book-actions .btn-outline:hover::before {
    left: 0;
}

.book-actions .btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35);
    position: relative;
    overflow: hidden;
}

.book-actions .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F7931E 0%, #FF6B35 100%);
    transition: left 0.3s ease;
    z-index: -1;
}

.book-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

.book-actions .btn-primary:hover::before {
    left: 0;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

.category-card h3 {
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.category-count {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

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

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

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

.social-links a {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: white;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    flex-shrink: 0;
}

.social-links a i {
    color: white;
    transition: color 0.3s;
}

.social-links a:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.social-links a:hover i {
    color: var(--dark);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Mobile Login/Signup Buttons - Small and Close Together */
    .nav-actions {
        gap: 0.35rem !important;
        flex-wrap: nowrap;
    }
    
    .nav-actions .btn {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.75rem !important;
        border-radius: 18px !important;
        min-width: auto !important;
        white-space: nowrap;
        min-height: 32px;
        font-weight: 600;
        line-height: 1.2;
    }
    
    .nav-actions .btn-outline {
        padding: 0.4rem 0.7rem !important;
        border-width: 1.5px;
    }
    
    .nav-actions .btn-primary {
        padding: 0.4rem 0.75rem !important;
    }
    
    /* Extra small mobile - even smaller and closer */
    @media (max-width: 480px) {
        .nav-actions {
            gap: 0.25rem !important;
        }
        
        .nav-actions .btn {
            padding: 0.35rem 0.65rem !important;
            font-size: 0.7rem !important;
            min-height: 30px;
            border-radius: 16px !important;
        }
        
        .nav-actions .btn-outline {
            padding: 0.35rem 0.6rem !important;
        }
        
        .nav-actions .btn-primary {
            padding: 0.35rem 0.65rem !important;
        }
    }
    
    /* Very small mobile - smallest buttons */
    @media (max-width: 360px) {
        .nav-actions {
            gap: 0.2rem !important;
        }
        
        .nav-actions .btn {
            padding: 0.3rem 0.55rem !important;
            font-size: 0.65rem !important;
            min-height: 28px;
            border-radius: 14px !important;
        }
        
        .nav-actions .btn-outline {
            padding: 0.3rem 0.5rem !important;
        }
        
        .nav-actions .btn-primary {
            padding: 0.3rem 0.55rem !important;
        }
    }
    
    /* Extra small mobile - even smaller */
    @media (max-width: 480px) {
        .nav-actions {
            gap: 0.4rem !important;
        }
        
        .nav-actions .btn {
            padding: 0.45rem 0.8rem !important;
            font-size: 0.75rem !important;
            border-radius: 18px !important;
        }
        
        .nav-actions .btn-outline {
            padding: 0.45rem 0.75rem !important;
        }
        
        .nav-actions .btn-primary {
            padding: 0.45rem 0.75rem !important;
        }
    }
    
    /* Very small mobile - smallest */
    @media (max-width: 360px) {
        .nav-actions {
            gap: 0.3rem !important;
        }
        
        .nav-actions .btn {
            padding: 0.4rem 0.7rem !important;
            font-size: 0.7rem !important;
            border-radius: 16px !important;
        }
        
        .nav-actions .btn-outline {
            padding: 0.4rem 0.65rem !important;
        }
        
        .nav-actions .btn-primary {
            padding: 0.4rem 0.65rem !important;
        }
    }
    
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Container Mobile */
    .container {
        padding: 0 15px;
    }
    
    /* Logo Mobile */
    .logo a {
        font-size: 1.2rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    /* Hero Mobile */
    .hero {
        padding: 3rem 0;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-text p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        min-height: 44px;
    }
    
    /* Features Mobile */
    .features {
        padding: 2.5rem 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .feature-card h3 {
        font-size: 1.1rem;
    }
    
    /* Books Grid Mobile */
    .books-section {
        padding: 2.5rem 0;
    }
    
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .book-card {
        border-radius: 12px;
    }
    
    .book-info {
        padding: 1rem;
    }
    
    .book-title {
        font-size: 0.95rem;
        min-height: 2.6rem;
    }
    
    .book-author {
        font-size: 0.85rem;
    }
    
    .current-price {
        font-size: 1.3rem;
    }
    
    .book-actions {
        gap: 0.5rem;
    }
    
    .book-actions .btn {
        padding: 0.65rem 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Categories Mobile */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem 1rem;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .category-card h3 {
        font-size: 0.95rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-col h3, .footer-col h4 {
        font-size: 1.1rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-links a {
        width: 35px;
        height: 35px;
        min-width: 35px;
        min-height: 35px;
        max-width: 35px;
        max-height: 35px;
        aspect-ratio: 1 / 1;
        font-size: 1rem;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
    
    /* Nav Icon Mobile */
    .nav-icon {
        font-size: 1.1rem;
        padding: 0.4rem;
    }
    
    .nav-icon .badge {
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
    
    /* User Dropdown Mobile */
    .user-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .user-btn i {
        font-size: 1.2rem;
    }
    
    .dropdown-menu {
        min-width: 180px;
        padding: 0.4rem;
    }
    
    .dropdown-menu a {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    /* Hero Extra Small */
    .hero {
        padding: 2rem 0;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    /* Section Titles Extra Small */
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .section-title p {
        font-size: 0.9rem;
    }
    
    /* Books Grid Extra Small */
    .books-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .book-info {
        padding: 0.85rem;
    }
    
    .book-title {
        font-size: 0.9rem;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
    
    /* Categories Extra Small */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .category-card {
        padding: 1.25rem 0.75rem;
    }
    
    /* Feature Cards Extra Small */
    .feature-card {
        padding: 1.25rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    /* Buttons Extra Small */
    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
        min-height: 42px;
    }
    
    /* Logo Extra Small */
    .logo a {
        font-size: 1rem;
    }
    
    .logo i {
        font-size: 1.3rem;
    }
}

/* Very Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-text h1 {
        font-size: 1.3rem;
    }
    
    .section-title h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
        min-height: 40px;
    }
}

/* Tablet (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .book-card,
    .category-card,
    .feature-card {
        min-height: 44px;
        cursor: pointer;
    }
    
    .book-actions .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

