/* ===========================
   GLOBAL
=========================== */
body {
    font-family: "Inter", "Segoe UI", sans-serif;
    margin: 0;
    background: #f5f5f7;
    color: #2c2c2c;
    transition: background 0.3s ease, color 0.3s ease;
}

.dark {
    background: #1c1c1e !important;
    color: #e5e5ea !important;
}

/* ===========================
   HEADER
=========================== */
.home-header {
    max-width: 1200px;
    margin: 25px auto 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-header h1 {
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tools */
.header-tools {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-box {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    width: 190px;
    transition: 0.25s;
}

.search-box:focus {
    border-color: #007aff;
    outline: none;
    box-shadow: 0 0 4px rgba(0,122,255,0.3);
}

.dark .search-box {
    background: #2c2c2e;
    border-color: #555;
    color: white;
}

#themeToggle {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}


/* ===========================
   HERO BANNER
=========================== */
.hero {
    width: 100%;
    background: linear-gradient(135deg, #007aff 0%, #00c6ff 100%);
    border-radius: 18px;
    max-width: 1200px;
    margin: 25px auto;
    padding: 40px 35px;
    color: white;
}

.hero-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.hero-content p {
    margin-top: 0;
    font-size: 16px;
    opacity: 0.9;
}

.dark .hero {
    background: linear-gradient(135deg, #0a84ff 0%, #3c9dff 100%);
}

/* ===========================
   SECTION TITLES
=========================== */
.section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
}

/* ===========================
   FEATURED + RECENT GRID
=========================== */
.featured-grid,
.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 28px;
}

/* ===========================
   BOOK CARD (Premium)
=========================== */
.book-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(0,0,0,0.08);
    transition: 0.28s ease;
}

.dark .book-card {
    background: #2c2c2e;
    box-shadow: 0 0 12px rgba(255,255,255,0.05);
}

.book-card:hover {
    transform: translateY(-6px);
}

/* Cover */
.book-cover {
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #f0f0f0;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info */
.book-info {
    padding: 14px;
}

.book-title {
    font-size: 15px;
    font-weight: 650;
    height: 42px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Read Button */
.read-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #007aff;
    color: white;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}

.read-btn:hover {
    background: #0058d6;
}

/* ===========================
   SKELETON LOADING
=========================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #fafafa 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.2s infinite ease-in-out;
    height: 300px;
    border-radius: 18px;
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ===========================
   ALL BOOKS GRID
=========================== */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 28px;
}

/* ===========================
   FOOTER
=========================== */
.footer {
    width: 100%;
    padding: 25px 0;
    margin-top: 50px;
    background: transparent;
    display: flex;
    justify-content: center;
}

.footer-inner {
    padding: 12px 22px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
}

.dark .footer-inner {
    background: #2c2c2e;
}

.footer-inner .dot {
    width: 6px;
    height: 6px;
    background: #007aff;
    border-radius: 50%;
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 720px) {
    .hero-content h2 {
        font-size: 22px;
    }

    .book-cover {
        height: 200px;
    }

    .home-header h1 {
        font-size: 26px;
    }
}


