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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #3498db;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #3498db;
    color: #fff;
    border: 2px solid #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-secondary {
    background-color: #2ecc71;
    color: #fff;
    border: 2px solid #2ecc71;
}

.btn-secondary:hover {
    background-color: #27ae60;
    border-color: #27ae60;
}

.btn-outline {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-outline:hover {
    background-color: #3498db;
    color: #fff;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-size: 1.8rem;
    color: #3498db;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 600;
    padding: 10px 5px;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('../images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    max-width: 500px;
    flex: 1;
}

.search-box input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.search-box button {
    padding: 15px 25px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #2980b9;
}

/* Featured Books Section */
.featured-books {
    padding: 60px 0;
}

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

.book-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.book-cover {
    height: 250px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.book-info {
    padding: 20px;
}

.book-info h3 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.author {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.view-more {
    text-align: center;
    margin-top: 40px;
}

/* Categories Section */
.categories {
    padding: 60px 0;
    background-color: #ecf0f1;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 15px;
}

.category-card h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

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

/* Recent Users Section */
.recent-users {
    padding: 60px 0;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.user-card {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #3498db;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-right: 15px;
}

.user-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.user-info p {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.user-info span {
    font-size: 0.8rem;
    color: #3498db;
    font-weight: 600;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 60px 0 20px;
}

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

.footer-logo h2 {
    color: #3498db;
    margin-bottom: 15px;
}

.footer-links h3,
.footer-categories h3,
.footer-contact h3 {
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-categories h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #3498db;
}

.footer-links ul li,
.footer-categories ul li {
    margin-bottom: 10px;
}

.footer-links ul li a,
.footer-categories ul li a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover,
.footer-categories ul li a:hover {
    color: #3498db;
}

.footer-contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 10px;
    color: #3498db;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #34495e;
    color: #ecf0f1;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #3498db;
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
    margin-right: 15px;
}

.mobile-menu-btn span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.mobile-menu-btn span:nth-child(1) {
    top: 0px;
}

.mobile-menu-btn span:nth-child(2) {
    top: 10px;
}

.mobile-menu-btn span:nth-child(3) {
    top: 20px;
}

.mobile-menu-btn.active span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.mobile-menu-btn.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        margin-bottom: 15px;
    }

    nav ul {
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .books-grid,
    .categories-grid,
    .users-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-content {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .logo {
        flex: 1;
    }
    
    .mobile-menu-btn {
        display: block;
        order: 2;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        order: 4;
        flex-basis: 100%;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .auth-buttons {
        order: 3;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .books-grid,
    .categories-grid,
    .users-grid {
        grid-template-columns: 1fr;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .auth-buttons .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        width: 100%;
    }
}