@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css');

/* ========================================================================== 
   CSS VARIABLES - GLOBAL DESIGN TOKENS
   Use these variables throughout the application for consistency
   Never hardcode these values - always reference the variable
   ========================================================================== */
   
:root {
    /* Primary Colors - Main brand colors */
    --primary-color: #3b82f6;    /* Used for links, buttons, and active elements */
    --primary-dark: #2563eb;     /* Darker shade of primary color for hover and active states */
    --primary-light: #60a5fa;    /* Lighter shade of primary color, used for backgrounds or highlighting */
    --secondary-color: #10b981;  /* Accent color, used for secondary actions or highlights */
    
    /* Text Colors - Typography */
    --text-dark: #1f2937;        /* Default text color for high readability */
    --text-medium: #6b7280;      /* Medium text color for secondary information */
    --text-light: #9ca3af;       /* Light text color for hints, disabled text, or secondary information */
    
    /* Background Colors */
    --bg-light: #f9fafb;         /* Light background color for pages and cards */
    --bg-white: #ffffff;         /* Pure white background, use sparingly for cards or sections */
    
    /* Border & Dividers */
    --border-color: #e5e7eb;     /* Default border color for dividers, input fields, and buttons */
    
    /* Shadows - Elevation system */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* Small shadow for subtle elevation */
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* Medium shadow for moderate elevation */
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); /* Large shadow for high elevation */
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1); /* Extra large shadow for topmost elevation */
}

/* ========================================================================== 
   GLOBAL RESET & BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    width: 100%;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* ========================================================================== 
   HEADER & NAVIGATION STYLES
   Used on: ALL pages via MainLayout
   Components: MainLayout.razor, NavMenu.razor
   ========================================================================== */
   
.main-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.header-logo a:hover {
    color: var(--primary-dark);
}

.header-logo i {
    font-size: 1.75rem;
}

.header-nav {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.header-nav .nav-link {
    color: var(--text-medium);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
}

.header-nav .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.header-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.header-auth .navbar-nav {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.header-auth .nav-item {
    display: flex;
    align-items: center;
}

.header-auth .nav-link {
    color: var(--text-medium);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.header-auth .nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.header-auth .btn-link {
    color: var(--text-medium);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.header-auth .btn-link:hover {
    color: var(--primary-color);
}

.header-auth form {
    margin: 0;
}

.header-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    order: 3;
}

/* Main Content */
.main-content {
    flex: 1;
    width: 100%;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* ========================================================================== 
   HERO SECTIONS - UNIVERSAL STYLING
   Used on: Multiple pages (Books, Wizard, Quotes, About)
   Pattern: [page]-hero class (e.g., .books-hero, .wizard-hero)
   Note: Homepage hero is in home.css as .hero-section
   
   All heroes have:
   - Purple gradient background
   - White text
   - Left-aligned content
   - Consistent padding
   ========================================================================== */

.books-page,
.book-detail-page,
.wizard-page,
.quotes-page,
.about-page {
    min-height: 100vh;
    background: var(--bg-light);
}

/* All hero sections - consistent styling */
.books-hero,
.book-detail-hero,
.wizard-hero,
.quotes-hero,
.about-hero,
.my-books-hero,
.recommendations-hero,
.feed-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 0;
    text-align: left;
}

.books-hero h1,
.book-detail-hero h1,
.wizard-hero h1,
.quotes-hero h1,
.about-hero h1,
.my-books-hero h1,
.recommendations-hero h1,
.feed-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.books-hero .lead,
.book-detail-hero .lead,
.wizard-hero .lead,
.quotes-hero .lead,
.about-hero .lead,
.my-books-hero .lead,
.recommendations-hero .lead,
.feed-hero .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    color: white;
    margin-bottom: 0;
}

/* Override any existing center-aligned heroes */
.quotes-hero,
.about-hero,
.my-books-hero,
.recommendations-hero,
.feed-hero {
    text-align: left;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .books-hero h1,
    .book-detail-hero h1,
    .wizard-hero h1,
    .quotes-hero h1,
    .about-hero h1,
    .my-books-hero h1,
    .recommendations-hero h1,
    .feed-hero h1 {
        font-size: 1.75rem;
    }

    .books-hero,
    .book-detail-hero,
    .wizard-hero,
    .quotes-hero,
    .about-hero,
    .my-books-hero,
    .recommendations-hero,
    .feed-hero {
        padding: 2rem 0;
    }
}

/* ========================================================================== 
   WIZARD PAGE STYLES
   Used on: /wizard page only
   Components: Pages/Wizard/Index.razor
   
   Structure:
   - wizard-page: Main container
   - wizard-hero: Header section
   - wizard-content: White card content
   - wizard-steps: Step indicator grid
   - wizard-text-step: Goals & CurrentSituation steps
   - wizard-questions-step: Questions step
   - wizard-books-step: Already read books step
   
   Standards:
   - padding-bottom: 4rem (consistent bottom spacing)
   - min-height: calc(100vh - 200px) (prevent footer overlap)
   ========================================================================== */

.wizard-page {
    min-height: 100vh;
    background: var(--bg-light);
}

.wizard-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 0;
}

.wizard-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.wizard-hero .lead {
    font-size: 1.25rem;
    opacity: 0.95;
}

.wizard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.wizard-content {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    margin-top: -2rem;
}

.wizard-intro {
    margin-bottom: 3rem;
}

.intro-card {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.intro-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.intro-icon i {
    font-size: 2.5rem;
    color: white;
}

.intro-card h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.intro-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.intro-card ul li {
    padding: 0.5rem 0;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.intro-card ul li i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.wizard-start {
    text-align: center;
    margin: 3rem 0;
}

.btn-start-wizard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-start-wizard:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.wizard-time {
    margin-top: 1rem;
    color: var(--text-medium);
    font-size: 0.9375rem;
}

.wizard-benefits {
    margin-top: 3rem;
}

.wizard-benefits h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.benefit-card {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s;
}

.benefit-card:hover {
    transform: translateY(-4px);
}

.benefit-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.benefit-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.benefit-card p {
    color: var(--text-medium);
    margin: 0;
    font-size: 0.875rem;
}

/* Wizard Steps Grid */
.wizard-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.step-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.step-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-card h4 {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin: 0;
}

/* Already read books grid */
.already-read-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.already-read-book-card {
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s;
    background: white;
}

.already-read-book-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.already-read-book-card.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.book-cover-container {
    position: relative;
    aspect-ratio: 2/3;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.book-title-small {
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
    max-height: 2.4rem;
    overflow: hidden;
}

.book-author-small {
    padding: 0 0.5rem 0.5rem;
    font-size: 0.6875rem;
    color: var(--text-medium);
    line-height: 1.2;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wizard-hero h1 {
        font-size: 1.75rem;
    }

    .wizard-content {
        padding: 1.5rem;
        margin-top: -1rem;
    }

    .intro-card {
        padding: 1.5rem;
    }

    .btn-start-wizard {
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .already-read-books-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Wizard Text Steps (Goals & CurrentSituation) */
.wizard-text-step {
    background: var(--bg-light);
    min-height: calc(100vh - 200px);
    padding-top: 3rem;
    padding-bottom: 4rem;
}

.wizard-text-step .card {
    box-shadow: var(--shadow-lg);
    border: none;
}

.wizard-text-step textarea.form-control {
    border: 2px solid var(--border-color);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 1rem;
}

.wizard-text-step textarea.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
    outline: none;
}

/* Wizard Questions Step */
.wizard-questions-step {
    background: var(--bg-light);
    min-height: calc(100vh - 200px);
    padding-bottom: 4rem;
}

.wizard-questions-step .card {
    box-shadow: var(--shadow-lg);
    border: none;
}

.wizard-questions-step .list-group-item {
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.wizard-questions-step .list-group-item:hover {
    background: var(--bg-light);
    cursor: pointer;
}

.wizard-questions-step .list-group-item.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Wizard Already Read Books Step */
.wizard-books-step {
    background: var(--bg-light);
    min-height: calc(100vh - 200px);
    padding-bottom: 4rem;
}

.wizard-books-step h2,
.wizard-books-step h5 {
    color: var(--text-dark);
    font-weight: 600;
}

.wizard-books-step .lead {
    color: var(--text-medium);
}

.already-read-books-grid h5 {
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ========================================================================== 
   FOOTER STYLES
   Used on: ALL pages via MainLayout
   Components: MainLayout.razor
   
   CRITICAL: Footer MUST be in site.css (not in component or page CSS)
   
   Structure:
   - main-footer: Dark background container
   - footer-container: Grid layout for footer sections
   - footer-section: Individual footer columns
   
   Typography:
   - H4/H5: White, 1.125rem, 600 weight
   - Links: Light gray, hover to white
   - Copyright: 0.875rem
   ========================================================================== */

.main-footer {
    background: var(--text-dark);
    color: var(--text-light);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section {
    line-height: 1.6;
}

.footer-section h4,
.footer-section h5 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h4 i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.footer-section p {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
    font-size: 0.9375rem;
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 0.25rem;
}

.footer-info {
    margin-bottom: 0.75rem;
}

.footer-info a {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.9375rem;
}

.footer-info a:hover {
    color: white;
    text-decoration: underline;
}

.footer-copyright {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .main-footer {
        padding: 2rem 0 1rem;
        margin-top: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .footer-section:first-child {
        text-align: center;
    }
    
    .footer-section h4,
    .footer-section h5 {
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .header-nav-toggle {
        display: block;
    }

    /* Hide desktop auth links on mobile */
    .header-auth {
        display: none;
    }

    .header-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 4rem 1.5rem 1.5rem;
        box-shadow: var(--shadow-xl);
        transition: left 0.3s ease;
        z-index: 1001;
        gap: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-nav.show {
        left: 0;
    }

    /* Mobile Close Button */
    .mobile-nav-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: var(--text-dark);
        font-size: 2rem;
        padding: 0.5rem;
        cursor: pointer;
        transition: color 0.2s;
        z-index: 1002;
        line-height: 1;
    }

    .mobile-nav-close:hover {
        color: var(--primary-color);
    }

    /* Mobile Nav Overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    .header-nav .nav-link {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
        font-size: 0.9375rem;
    }

    .header-nav .nav-link:hover {
        border-bottom-color: var(--border-color);
        padding-left: 0.5rem;
    }

    .header-container {
        padding: 1rem;
    }

    /* Mobile User Menu */
    .mobile-user-menu {
        width: 100%;
        margin-top: 0;
    }

    .mobile-auth-menu {
        width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        /*border-top: 1px solid var(--border-color);* No extra border to prevent duplicate borders */
    }

    .mobile-user-divider {
        height: 1px;
        background: var(--border-color);
        margin: 0.5rem 0;
    }

    /* Desktop only - hide mobile menu */
    .mobile-user-menu {
        display: block;
    }
}

/* Desktop - hide mobile menu and overlay */
@media (min-width: 993px) {
    .mobile-user-menu {
        display: none;
    }

    .mobile-auth-menu {
        display: none;
    }

    .mobile-nav-close {
        display: none;
    }

    .mobile-nav-overlay {
        display: none;
    }
}

/* Remove focus outline from h1 elements with tabindex=-1 (added by FocusOnNavigate) */
h1[tabindex="-1"]:focus {
    outline: none;
}

/* Empty state button icons should be normal size */
.empty-state .btn i,
.empty-state-feed .btn i {
    font-size: 1rem !important;
}

/* ========================================================================== 
   BOOKS PAGE STYLES
   Used on: /books page
   Components: Pages/Books/Index.razor
   
   Structure:
   - books-page: Main container
   - books-hero: Header section with purple gradient
   - books-grid: Grid layout for book cards
   - book-card: Individual book display cards
   
   Visual Feedback:
   - book-added: Class for books being added (shows green checkmark)
   - book-cover-success: Makes cover semi-transparent
   - book-success-overlay: Green checkmark overlay
   - book-in-library: Class for books already owned (search results)
   - book-status-badge: Shows status (Want/Reading/Read)
   ========================================================================== */

/* Book Cards with Visual Feedback */
.book-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* Book added state */
.book-card.book-added {
    animation: bookAddedPulse 0.8s ease-in-out;
}

/* Book in library state (for search results) */
.book-card.book-in-library {
    opacity: 0.85;
}

.book-card.book-in-library:hover {
    opacity: 1;
}

@keyframes bookAddedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Book cover with success state */
.book-cover {
    position: relative;
    aspect-ratio: 2/3;
    background: var(--bg-light);
    overflow: hidden;
}

/* Success state - semi-transparent cover */
.book-cover-success {
    opacity: 0.5 !important;
}

/* Owned state - slightly transparent cover */
.book-cover-owned {
    opacity: 0.7 !important;
}

/* Green checkmark overlay */
.book-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 185, 129, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: fadeIn 0.3s ease-in;
}

.book-success-overlay i {
    font-size: 4rem;
    color: #10b981;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    animation: checkmarkPop 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Status badge for books already in library */
.book-status-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    z-index: 10;
    color: var(--text-dark);
    backdrop-filter: blur(8px);
}

.book-status-badge i {
    font-size: 0.875rem;
}

/* Different colors for different statuses */
.book-status-badge i.bi-bookmark-fill {
    color: #3b82f6; /* Blue for "Want to Read" */
}

.book-status-badge i.bi-book-half {
    color: #f59e0b; /* Orange for "Currently Reading" */
}

.book-status-badge i.bi-check-circle-fill {
    color: #10b981; /* Green for "Read" */
}

.book-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--bg-light) 0%, #e5e7eb 100%);
}

.book-rating {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    z-index: 5;
}

.book-rating i {
    color: #fbbf24;
}

.book-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 2rem 1rem 1rem;
    transition: opacity 0.3s;
}

.book-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    color: white;
    z-index: 2;
}

.book-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Scope to books page only to prevent conflicts with my-books */
.books-page .book-card:hover .book-actions {
    opacity: 1;
}

.books-page .book-actions .btn {
    flex: 1;
    height: 2.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.books-page .book-actions .btn:hover:not(.disabled) {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-md);
}

.books-page .book-actions .btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.books-page .book-actions .btn i {
    font-size: 1rem;
}

.books-page .book-actions .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.25rem;
    pointer-events: none;
}

.search-input {
    padding-left: 3rem;
    padding-right: 3rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.btn-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-clear:hover {
    color: var(--text-dark);
}

/* Active Filters */
.active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.active-filters .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Filters Panel */
.filters-panel {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filters-header h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.filter-tag {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    background: white;
}

.filter-tag:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.filter-tag.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.filter-tag i {
    font-size: 1rem;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 4rem 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    margin: 3rem 0;
}

.load-more-section .btn {
    min-width: 200px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .book-title {
        font-size: 0.875rem;
    }

    .book-author {
        font-size: 0.75rem;
    }

    .filters-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ========================================================================== 
   QUOTES PAGE STYLES
   Used on: /quotes page
   Components: Pages/Quotes/Index.razor
   
   Structure:
   - quotes-page: Main container
   - quotes-hero: Header section
   - quote-card: Individual quote cards with elegant styling
   - quote-actions: Like and share buttons
   ========================================================================== */

.quotes-page {
    min-height: 100vh;
    background: var(--bg-light);
}

/* Filter Pills Navigation */
.quotes-page .nav-pills {
    background: white;
    padding: 0.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    gap: 0.5rem;
}

.quotes-page .nav-pills .nav-link {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    color: var(--text-medium);
    border: none;
    background: transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quotes-page .nav-pills .nav-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.quotes-page .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.quotes-page .nav-pills .nav-link i {
    font-size: 1.125rem;
}

/* Quote Card Styling */
.quote-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    background: white;
    position: relative;
}

.quote-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quote-card:hover::before {
    transform: scaleX(1);
}

.quote-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl) !important;
}

.quote-card .card-body {
    padding: 2rem;
    position: relative;
}

/* Quote Icon */
.quote-card .bi-quote {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--primary-color);
    opacity: 0.15;
    font-size: 3rem;
    transition: all 0.3s ease;
}

.quote-card:hover .bi-quote {
    opacity: 0.25;
    transform: scale(1.1);
}

/* Blockquote Styling */
.quote-card .blockquote {
    margin: 0;
    position: relative;
    z-index: 1;
}

.quote-card .blockquote p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 400;
    margin-bottom: 0;
    margin-left:30px;
    font-style: italic;
}

.quote-card .blockquote-footer {
    font-size: 0.9375rem;
    color: var(--text-medium);
    font-style: normal;
    margin-top: 1rem;
}



/* Book Reference Section */
.quote-book-reference {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quote-book-reference img {
    border-radius: 0.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.quote-book-reference:hover img {
    transform: scale(1.05);
}

.quote-book-reference a {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.quote-book-reference a:hover {
    color: var(--primary-color);
}

.quote-book-reference small {
    color: var(--text-medium);
    font-size: 0.875rem;
}

/* Card Footer with Actions */
.quote-card .card-footer {
    padding: 1rem 2rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

/* Like Button */
.btn-like {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.2s;
    border: 2px solid var(--border-color);
}

.btn-like:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-like.liked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    animation: likeAnimation 0.4s ease;
}

.btn-like.liked i {
    animation: heartBeat 0.4s ease;
}

@keyframes likeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Share Button */
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 500;
    transition: all 0.2s;
}

/* Share Menu Dropdown */
.share-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    z-index: 1000;
    min-width: 180px;
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-menu .btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-menu .btn:hover {
    background: var(--bg-light);
}

.share-menu .btn i {
    font-size: 1.25rem;
}

/* WhatsApp green color */
.share-menu .btn i.bi-whatsapp {
    color: #25D366;
}

/* Clipboard icon color */
.share-menu .btn i.bi-clipboard {
    color: var(--primary-color);
}
