/* ========================================
   BuggersBooks.com - Custom Styles
   Built on Bootstrap 5
   ======================================== */

/* ---- General ---- */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main, .container {
    flex: 1;
}

a {
    color: #d4860b;
}

a:hover {
    color: #b0700a;
}

/* ---- Navbar ---- */
.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.navbar .btn-warning {
    color: #212529;
    font-weight: 600;
}

/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #fff);
}

.hero-section h1 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-section .form-control,
.hero-section .form-select {
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* ---- Hero Suggestions ---- */
.hero-suggestions .badge {
    padding: 6px 12px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-suggestions .badge:hover {
    background: rgba(255,255,255,0.35) !important;
}

/* ---- Trending Books ---- */
.trending-book {
    transition: transform 0.2s;
}

.trending-book:hover {
    transform: translateY(-4px);
}

.trending-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    background: #f0f0f0;
}

/* ---- Vibe Chips ---- */
.vibe-chip {
    font-size: 0.85rem;
    padding: 8px 16px;
    transition: all 0.2s;
}

.vibe-chip:hover {
    background: #f0a500;
    border-color: #f0a500;
    color: #212529;
    transform: translateY(-2px);
}

/* ---- Author Cards ---- */
.author-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.author-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ---- How It Works Steps ---- */
.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f0a500;
    color: #212529;
    font-size: 1.3rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---- Feature Cards ---- */
.feature-card {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* ---- Book Cards (list view) ---- */
.book-card {
    transition: box-shadow 0.2s;
    border: 1px solid #e9ecef;
}

.book-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ---- Book Cards (grid view for search results) ---- */
.book-card-grid {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.book-card-grid:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.book-cover-grid {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: #f0f0f0;
}

@media (max-width: 575.98px) {
    .book-cover-grid {
        height: 240px;
    }
}

.book-cover-search {
    width: 100px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px 0 0 4px;
    background: #f0f0f0;
}

.book-cover-detail {
    max-width: 250px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* ---- Book Description ---- */
.book-description {
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.7;
}

/* ---- Star Rating ---- */
.stars i {
    font-size: 1.1rem;
}

.stars.small i {
    font-size: 0.9rem;
}

/* Interactive star rating input */
.star-rating-input {
    display: inline-flex;
    gap: 4px;
}

.star-rating-input .star-input {
    font-size: 1.8rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}

.star-rating-input .star-input:hover,
.star-rating-input .star-input.active {
    color: #ffc107;
}

/* ---- Badges ---- */
.badge.bg-light {
    border: 1px solid #dee2e6;
}

/* ---- Cards ---- */
.card {
    border-radius: 10px;
    border-color: #e9ecef;
}

/* ---- Buttons ---- */
.btn-warning {
    background-color: #f0a500;
    border-color: #f0a500;
    color: #212529;
    font-weight: 600;
}

.btn-warning:hover {
    background-color: #d4920a;
    border-color: #d4920a;
    color: #212529;
}

.btn-outline-warning {
    color: #d4860b;
    border-color: #d4860b;
}

.btn-outline-warning:hover {
    background-color: #f0a500;
    border-color: #f0a500;
    color: #212529;
}

/* ---- Subject Cards ---- */
.subject-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 10px;
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ---- Footer ---- */
footer {
    margin-top: auto;
}

footer a:hover {
    color: #f0a500 !important;
}

/* ---- Pagination ---- */
.page-item.active .page-link {
    background-color: #f0a500;
    border-color: #f0a500;
    color: #212529;
}

.page-link {
    color: #d4860b;
}

.page-link:hover {
    color: #b0700a;
}

/* ---- Search Autocomplete ---- */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1050;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0 !important;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .book-cover-search {
        width: 80px;
        height: 120px;
    }

    .book-cover-detail {
        max-width: 180px;
    }
}

/* ---- No Cover Placeholder ---- */
img[src$="no-cover.svg"] {
    background: #e9ecef;
    padding: 20px;
}
