@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #020617;     /* Match dashboard bg-base */
    --bg-card: #0f172a;     /* Match dashboard bg-surface */
    --text-main: #f1f5f9;   /* Match dashboard text-1 */
    --text-secondary: #94a3b8; /* Match dashboard text-2 */
    --glass-border: rgba(148,163,184,0.1); 
    --glass-bg: rgba(15, 23, 42, 0.85);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.3);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Layout Containers --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Glassmorphism --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* --- Navbar --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition-base);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 45px;
    width: auto;
    border-radius: var(--radius-sm);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 9999px;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: var(--text-main);
    width: 250px;
    transition: var(--transition-base);
}

.search-input:focus {
    outline: none;
    width: 350px;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
}

.btn-login {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.75rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

/* --- Hero Section --- */
.hero {
    height: 85vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: center;
    margin-bottom: 4rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.95));
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* --- Books Grid --- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

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

.book-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.book-cover-container {
    height: 400px;
    overflow: hidden;
    position: relative;
}

.book-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

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

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

.book-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

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

.book-author {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.login-modal {
    width: 100%;
    max-width: 450px;
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.modal-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--text-secondary);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    color: white;
    transition: var(--transition-base);
}

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

.glass-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    color: white;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.glass-select option {
    background: var(--bg-dark);
    color: white;
}

/* --- Footer --- */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 5rem;
    text-align: center;
    color: var(--text-secondary);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-actions {
        gap: 0.5rem;
    }
    
    .logo-container .brand-name {
        display: none; /* Hide full name on mobile to save space */
    }
    
    .search-input {
        width: 130px;
        font-size: 0.8rem;
        padding-left: 2rem;
    }
    
    .search-input:focus {
        width: 180px;
    }
    
    .search-icon {
        left: 0.7rem;
        font-size: 0.8rem;
    }
    
    .btn-login {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-top: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .book-cover-container {
        height: 300px;
    }
    
    .login-modal {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .search-input {
        width: 100px;
    }
    .search-input:focus {
        position: absolute;
        right: 0;
        width: 250px;
        z-index: 100;
        background: var(--bg-dark);
    }
    .book-grid {
        grid-template-columns: 1fr;
    }
}
