/* Reset and Base 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: #f5f5f5;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #2c3e50;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    height: 40px;
}

.profile img {
    height: 35px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.3s;
}

.profile img:hover {
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
}

.search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

#searchInput {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

#searchBtn {
    padding: 12px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
}

#searchBtn:hover {
    background-color: #2980b9;
}

/* Books Sections */
.books-section {
    margin-bottom: 3rem;
}

.books-section h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

/* Books Containers */
.books-container {
    display: flex;
    gap: 20px;
}

.horizontal-scroll {
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.vertical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Book Cards */
.book-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    min-width: 150px;
    overflow: hidden;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.book-cover {
    width: auto;
    position: relative;
    height: 400px;
    overflow: hidden;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.paid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.paid-overlay::after {
    content: '🔓';
    font-size: 2rem;
    color: white;
}
.notpaid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notpaid-overlay::after {
    content: '🔒';
    font-size: 2rem;
    color: white;
}

.book-info {
    padding: 10px;
}

.book-title {
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-author {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 1.5rem;
    cursor: pointer;
}

#adContent {
    height: 300px;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    border-radius: 4px;
}

#continueToBook {
    width: 100%;
    padding: 10px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#continueToBook:hover {
    background-color: #219a52;
}

.back-btn {
            display: block;
            text-align: center;
            margin-top: 1rem;
            color: #ccc;
            padding: 12px;
            background-color: rgba(0,0,0, 0.2);
            text-decoration: none;
        }

/* Footer Styles */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: #3498db;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.social-links a:hover {
    background: #3498db;
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: #3498db;
    width: 20px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .auth-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .benefits {
        max-width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .vertical-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .book-cover {
        height: 300px;
    }
}