@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800;900&family=Lato:wght@300;400;500;700&family=Kalam:wght@300;400;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

* {
    font-family: 'Lato', sans-serif;
}

/* Headline/Logo - Montserrat */
h1, h2, h3, h4, h5, h6, .headline, .logo, .title-lg {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Multi-Script - Kalam for quotes and captions */
.kalam, .quote, .caption, .handwritten {
    font-family: 'Kalam', cursive;
    font-weight: 400;
}

/* Font weight utilities for Montserrat headings */
h1, h2, h3 { font-weight: 800; }
h4, h5, h6 { font-weight: 700; }

/* Montserrat for logo/branding */
.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: -0.5px;
}

/* Lato body text styling */
body, p, span, a, button {
    font-family: 'Lato', sans-serif;
    font-weight: 400;
}

button, .btn-primary, .btn-ghost-teal, .btn-emerald {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.book-content {
    white-space: pre-line;
    line-height: 1.8;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Standardized Book Card */
.book-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-8px);
}

.book-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 2/2.5;
    overflow: hidden;
    flex-shrink: 0;
}

.book-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.book-card:hover .book-card-image img {
    transform: scale(1.05);
}

.book-card-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 160px;
    flex-shrink: 0;
}

.book-card-title {
    height: 36px;
    margin-bottom: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.book-card-author {
    height: 18px;
    margin-bottom: 3px;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
}

.book-card-image img {
    transition: transform 0.3s ease;
    object-fit: contain;
}

.book-card:hover .book-card-image img {
    transform: scale(1.05);
}

.book-card-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: auto;
    flex-shrink: 0;
}

.book-card-category {
    height: 16px;
    margin-bottom: 8px;
}

.book-card-actions {
    margin-top: auto;
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-primary {
    background: var(--accent-blue);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 10px 25px -5px rgba(0, 191, 255, 0.4);
}

.btn-read-now {
    background: var(--accent-blue);
    color: white;
    transition: all 0.3s ease;
}

.btn-read-now:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.3);
}

.loading-spinner {
    border: 3px solid rgba(0, 206, 209, 0.25);
    border-radius: 50%;
    border-top: 3px solid var(--peacock-teal);
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-gradient {
    background: var(--bg-dark-2);
    border-bottom: 1px solid var(--divider);
}

/* Category buttons */
.category-btn {
    background: var(--bg-surface);
    color: var(--text-strong);
    border: 1px solid var(--divider);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.category-btn:hover {
    background: var(--bg-surface-2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.animate-slideUp {
    animation: slideUp 0.3s ease-out;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
/* Filter Drawer Styles */
.filter-drawer {
    position: fixed;
    right: -420px;
    top: 0;
    width: 420px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
    overflow-y: auto;
}
.filter-drawer.open {
    right: 0;
}
.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.filter-overlay.active {
    opacity: 1;
    visibility: visible;
}
/* Mobile Filter Bottom Sheet */
.filter-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: white;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 60;
    overflow-y: auto;
}
.filter-sheet.open {
    bottom: 0;
}
.filter-sheet::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 10px;
}
/* Accordion Styles */
.accordion-header {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.accordion-header:hover {
    background: rgba(251, 191, 36, 0.05);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-content.expanded {
    max-height: 600px;
}
.filter-option {
    transition: all 0.2s ease;
}
.filter-option:active {
    transform: scale(0.98);
}
@media (max-width: 640px) {
    .filter-drawer {
        display: none;
    }
}
@media (min-width: 641px) {
    .filter-sheet {
        display: none;
    }
}
.active-filter-tag {
    animation: slideInRight 0.3s ease;
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Serene Scribe Dark Theme Variables */
:root {
    --bg-dark: #1A1A1A; /* main background (dark gray/black) */
    --bg-dark-2: #0F0F0F; /* deepest surface (nav bars) */
    --bg-surface: #2A2A2A; /* page/header surface */
    --bg-surface-2: #333333; /* elevated card surface */
    --text-strong: #FFFFFF; /* primary text */
    --text-muted: #C8C8C8; /* secondary text */
    --divider: rgba(255,255,255,0.1);
    /* Accent Colors */
    --accent-blue: #00BFFF; /* light blue for buttons and accents */
    --accent-blue-hover: #0099CC; /* hover state */
    --peacock-teal: #00BFFF; /* primary accent */
    --peacock-emerald: #00BFFF; /* CTA/action */
    --peacock-gold: #BFA65A; /* muted luxury gold */
    --peacock-indigo: #3D4987; /* jewel indigo */
    --peacock-violet: #5B2E91; /* jewel violet */
}
/* Global background */
body {
    background: var(--bg-dark) !important;
    background-color: var(--bg-dark) !important;
    color: var(--text-strong);
}

/* Hero section with peacock feather background */
.hero-section {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Make the static part of the hero title slightly larger than the ticker */
.hero-static {
    display: inline-block;
    font-size: 1.25em;
    font-weight: 700;
    letter-spacing: 0.4px;
    font-family: 'Montserrat', sans-serif;
    /* gradient color similar to the attached design */
    background: linear-gradient(90deg, #ff6b6b 0%, #a55eea 50%, #6b9bff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    padding-right: 6px;
}

/* Ticker (animated words) styling - using Kalam for handwritten feel */
#heroTicker {
    display: inline-block;
    color: linear-gradient(90deg, #ff6b6b 0%, #a55eea 50%, #6b9bff 100%);;
    font-weight: 400;
    font-size: 1.05em;
    font-family: 'Kalam', cursive;
    margin-left: 8px;
    transition: color 0.2s ease, opacity 0.2s ease;
    
}

/* Cursor after the ticker */
#heroTicker::after {
    content: '|';
    display: inline-block;
    margin-left: 6px;
    opacity: 1;
    animation: blink 1s steps(1) infinite;
    color: #a18cd1;
    font-weight: 700;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .hero-static { font-size: 1.6em; }
    #heroTicker { font-size: 1.25em; }
}
@media (max-width: 640px) {
    .hero-static { font-size: 1.12em; }
    #heroTicker { font-size: 1em; }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1625580916836-1badf2c15b32?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center/cover no-repeat;
    z-index: 0;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.hero-section > * {
    position: relative;
    z-index: 2;
}

@media (max-width: 640px) {
    .hero-section {
        min-height: 300px;
    }
}
html { color: var(--text-strong); }
/* Links */
a { color: var(--peacock-teal); }
a:hover { color: var(--peacock-violet); }
/* Dark theme remaps for common Tailwind utilities */
.bg-white { background-color: var(--bg-surface) !important; }
.bg-slate-50 { background-color: var(--bg-dark-2) !important; }
.bg-slate-100 { background-color: var(--bg-surface) !important; }
.bg-slate-200 { background-color: var(--bg-surface-2) !important; }
.border-slate-100 { border-color: rgba(255,255,255,0.06) !important; }
.border-slate-200 { border-color: var(--divider) !important; }
.text-slate-900, .text-slate-800 { color: var(--text-strong) !important; }
.text-slate-700 { color: #EDEDED !important; }
.text-slate-600 { color: #D9D9D9 !important; }
.text-slate-500 { color: var(--text-muted) !important; }
.text-slate-400 { color: #A8A8A8 !important; }
/* Inputs */
input[type="text"], input[type="email"], input[type="password"] {
    background-color: var(--bg-surface) !important;
    border-color: var(--divider) !important;
    color: var(--text-strong) !important;
}
input::placeholder { color: var(--text-muted) !important; }

/* Search bar styling */
.search-bar {
    background: rgba(26, 26, 26, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--divider);
}
/* Glassmorphism on dark */
.glassmorphism {
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--divider);
}
/* Drawers/Sheets */
.filter-drawer { background: var(--bg-surface) !important; border-left: 1px solid var(--divider); }
.filter-sheet { background: var(--bg-surface) !important; }
.filter-sheet::before { background: var(--text-muted) !important; }
/* Cards */
.book-card { 
    background-color: var(--bg-surface) !important; 
    border-color: var(--divider) !important; 
    border-radius: 12px;
}
.book-card:hover { 
    box-shadow: 0 10px 20px -5px rgba(0, 191, 255, 0.3); 
    border-color: var(--accent-blue) !important; 
}
.book-card-image { 
    background: var(--bg-surface-2) !important; 
    border-radius: 8px 8px 0 0;
}
.book-card-category { color: var(--text-muted) !important; }
.book-card-title { color: var(--text-strong) !important; }
.book-card-author { color: var(--text-muted) !important; }
/* Buttons */
.btn-emerald {
    background: var(--accent-blue) !important;
    color: white !important;
    transition: all 0.3s ease;
}
.btn-emerald:hover {
    background: var(--accent-blue-hover) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 191, 255, 0.4);
}
.btn-ghost-teal { 
    background: transparent !important; 
    border: 1px solid var(--accent-blue) !important; 
    color: var(--accent-blue) !important; 
}
.btn-ghost-teal:hover { 
    background: rgba(0, 191, 255, 0.1) !important; 
}
/* Icons */
.favorite-btn { color: var(--text-muted) !important; }
.favorite-btn:hover { color: var(--accent-blue) !important; }
.filter-btn:hover svg { color: var(--accent-blue) !important; }
/* Sections previously using light backgrounds */
.bg-gradient-to-b.from-slate-50.to-white { background-image: linear-gradient(to bottom, var(--bg-dark-2), var(--bg-surface)) !important; }
.bg-white\/10 { background-color: rgba(255,255,255,0.08) !important; }
.bg-white\/20 { background-color: rgba(255,255,255,0.12) !important; }
.bg-white\/90 { background-color: rgba(26,26,26,0.9) !important; }
.bg-white\/90.glassmorphism { background-color: rgba(26,26,26,0.85) !important; }

/* Bottom mobile nav and footer-like bars */
nav.fixed.bottom-0 { 
    background-color: var(--bg-dark-2) !important; 
    border-color: var(--divider) !important; 
    backdrop-filter: blur(10px);
}
/* Search/header bar */
.border-slate-200.shadow-sm { box-shadow: 0 1px 0 rgba(0,0,0,0.4) !important; }
/* Buttons and neutral hovers */
.p-2.bg-slate-100, .p-2\.5.hover\:bg-slate-100, .hover\:bg-slate-100:hover { background-color: var(--bg-surface-2) !important; }
.hover\:bg-slate-200:hover { background-color: #3D3D3D !important; }
/* Map previous amber/orange accents to light blue */
.text-amber-600 { color: var(--accent-blue) !important; }
.text-amber-700 { color: var(--accent-blue) !important; }
.bg-amber-500 { background-color: var(--accent-blue) !important; }
.hover\:bg-amber-600:hover { background-color: var(--accent-blue-hover) !important; }
.border-amber-200 { border-color: rgba(0, 191, 255, 0.2) !important; }
.border-amber-300 { border-color: rgba(0, 191, 255, 0.3) !important; }
.border-amber-500 { border-color: var(--accent-blue) !important; }
/* Dark versions for amber gradients */
.from-amber-50 { --tw-gradient-from: rgba(0, 206, 209, 0.1) var(--tw-gradient-from-position); --tw-gradient-to: rgba(0,206,209,0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.from-amber-100 { --tw-gradient-from: rgba(0, 206, 209, 0.15) var(--tw-gradient-from-position); --tw-gradient-to: rgba(0,206,209,0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.via-orange-50 { --tw-gradient-via: rgba(0, 209, 92, 0.1) var(--tw-gradient-via-position); }
.to-amber-50 { --tw-gradient-to: rgba(0, 206, 209, 0.1) var(--tw-gradient-to-position); }
.bg-gradient-to-r.from-amber-50.to-white { background-image: linear-gradient(to right, rgba(0, 206, 209, 0.1), var(--bg-surface-2)) !important; }
.bg-gradient-to-br.from-amber-400.to-orange-500 { background-image: linear-gradient(to bottom right, var(--peacock-teal), var(--peacock-emerald)) !important; }
.bg-gradient-to-br.from-amber-100.to-amber-200 { background-image: linear-gradient(to bottom right, rgba(0, 206, 209, 0.15), rgba(0, 206, 209, 0.08)) !important; }
.bg-gradient-to-r.from-amber-50.via-orange-50.to-amber-50 { background-image: linear-gradient(to right, rgba(0, 206, 209, 0.15), rgba(0, 209, 92, 0.1), rgba(0, 206, 209, 0.15)) !important; }
.hover\:bg-amber-50\/30:hover { background-color: rgba(0, 206, 209, 0.08) !important; }
/* Map previous blue accents to jewel tones */
.text-blue-600 { color: var(--peacock-indigo) !important; }
.text-blue-700 { color: var(--peacock-indigo) !important; }
.bg-blue-500 { background-color: var(--peacock-teal) !important; }
.border-blue-100 { border-color: rgba(255,255,255,0.12) !important; }
.border-blue-500 { border-color: var(--peacock-indigo) !important; }
.from-blue-50 { --tw-gradient-from: rgba(61, 73, 135, 0.1) var(--tw-gradient-from-position); --tw-gradient-to: rgba(61,73,135,0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-blue-50 { --tw-gradient-to: rgba(61, 73, 135, 0.1) var(--tw-gradient-to-position); }
.from-blue-100 { --tw-gradient-from: rgba(61, 73, 135, 0.15) var(--tw-gradient-from-position); --tw-gradient-to: rgba(61,73,135,0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-blue-200 { --tw-gradient-to: rgba(61, 73, 135, 0.2) var(--tw-gradient-to-position); }
.bg-gradient-to-r.from-blue-50.to-white { background-image: linear-gradient(to right, rgba(61, 73, 135, 0.1), var(--bg-surface-2)) !important; }
.bg-gradient-to-r.from-blue-50.via-indigo-50.to-blue-50 { background-image: linear-gradient(to right, rgba(61, 73, 135, 0.15), rgba(91, 46, 145, 0.1), rgba(61, 73, 135, 0.15)) !important; }
.hover\:bg-blue-50\/30:hover { background-color: rgba(61, 73, 135, 0.08) !important; }
/* Chips and tags that used amber */
.bg-gradient-to-r.from-amber-100.to-orange-100 { background-image: none !important; background-color: var(--peacock-indigo) !important; color: #ffffff !important; border-color: var(--peacock-indigo) !important; }
.hover\:text-amber-600:hover { color: var(--accent-blue) !important; }
.group:hover .group-hover\:text-amber-600 { color: var(--accent-blue) !important; }
.active-filter-tag svg { color: var(--accent-blue) !important; }
/* Mobile active tab color replacement for text-amber-500 */
.text-amber-500 { color: var(--accent-blue) !important; box-shadow: inset 0 -2px 0 0 var(--accent-blue); }

/* Inputs focus ring color */
.focus\:ring-amber-500:focus { --tw-ring-color: var(--accent-blue) !important; }
.focus\:border-amber-500:focus { border-color: var(--accent-blue) !important; }

/* Button alt backgrounds previously slate */
.hover\:bg-slate-100:hover { background-color: rgba(255,255,255,0.6) !important; }
.bg-slate-900\/95 { background-color: rgba(11, 29, 42, 0.95) !important; }
/* Profile accents */
.bg-gradient-to-br.from-amber-50.to-orange-50 { background-image: linear-gradient(to bottom right, rgba(0, 206, 209, 0.15), rgba(0, 209, 92, 0.1)) !important; }
.bg-gradient-to-br.from-blue-50.to-indigo-50 { background-image: linear-gradient(to bottom right, rgba(61, 73, 135, 0.15), rgba(91, 46, 145, 0.1)) !important; }
/* Hide library nav on small screens when desired */
@media (max-width: 640px) {
    .hide-library-mobile { display: none !important; }
}
