/* Custom Aesthetics & Typography for BoiMela */
/* Note: Google Fonts are preconnected and loaded asynchronously in header.php for maximum performance */

:root {
    --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
    --font-bangla: 'Hind Siliguri', 'Inter', sans-serif;
}

[x-cloak] {
    display: none !important;
}

body {
    font-family: var(--font-bangla);
    color: #1e293b;
    background-color: #f8fafc;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

html.dark body,
html.dark {
    color: #f1f5f9;
    background-color: #020617;
}

/* Glassmorphism Classes with Dark Support */
.glass-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
html.dark .glass-nav {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(241, 245, 249, 1);
}
html.dark .glass-card {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(30, 41, 59, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.dark ::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
.dark ::-webkit-scrollbar-thumb {
    background: #334155;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Smooth Transitions & Micro-Animations */
.hover-lift {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -10px rgba(15, 23, 42, 0.12);
}

/* Pulse badge */
@keyframes pulse-subtle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}
.animate-pulse-subtle {
    animation: pulse-subtle 2s infinite ease-in-out;
}

/* Radar Waves & Radar Glow */
@keyframes radar-ripple {
    0% {
        transform: scale(0.6);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}
.animate-radar-ripple {
    animation: radar-ripple 4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}
.animate-float-slow {
    animation: float-slow 4s ease-in-out infinite;
}
.animate-float-delayed {
    animation: float-slow 5s ease-in-out 1.5s infinite;
}

/* 3D Book Card Shadow */
.book-3d-card {
    box-shadow: -3px 5px 12px rgba(0, 0, 0, 0.4), inset 2px 0 2px rgba(255, 255, 255, 0.2);
}

/* Line Clamp Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide scrollbar for clean horizontal mobile tabs */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile Safe Area Bottom Padding */
.safe-area-bottom {
    padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
}

@media (max-width: 768px) {
    body {
        padding-bottom: 4.5rem; /* Space for the native bottom app bar */
    }
}

/* ==========================================================================
   Quill.js Visual WYSIWYG Editor (WordPress / Notion Style)
   ========================================================================== */
.ql-toolbar.ql-snow {
    border-color: #e2e8f0 !important;
    background-color: #f8fafc !important;
    border-top-left-radius: 1rem !important;
    border-top-right-radius: 1rem !important;
    padding: 0.6rem 0.75rem !important;
    font-family: inherit !important;
}

.dark .ql-toolbar.ql-snow {
    border-color: #334155 !important;
    background-color: #1e293b !important;
}

.ql-container.ql-snow {
    border-color: #e2e8f0 !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-bottom-left-radius: 1rem !important;
    border-bottom-right-radius: 1rem !important;
    font-family: var(--font-bangla) !important;
    font-size: 0.925rem !important;
}

.dark .ql-container.ql-snow {
    border-color: #334155 !important;
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

.ql-editor {
    min-height: 180px !important;
    line-height: 1.7 !important;
    padding: 1rem !important;
}

.ql-editor.ql-blank::before {
    color: #94a3b8 !important;
    font-style: normal !important;
    font-family: var(--font-bangla) !important;
}

.dark .ql-editor.ql-blank::before {
    color: #64748b !important;
}

.dark .ql-snow .ql-stroke {
    stroke: #94a3b8 !important;
}

.dark .ql-snow .ql-fill {
    fill: #94a3b8 !important;
}

.dark .ql-snow .ql-picker {
    color: #cbd5e1 !important;
}

.dark .ql-snow .ql-picker-options {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover,
.ql-snow.ql-toolbar button:focus,
.ql-snow .ql-toolbar button:focus,
.ql-snow.ql-toolbar button.ql-active,
.ql-snow .ql-toolbar button.ql-active,
.ql-snow.ql-toolbar .ql-picker-label:hover,
.ql-snow .ql-toolbar .ql-picker-label:hover,
.ql-snow.ql-toolbar .ql-picker-label.ql-active,
.ql-snow .ql-toolbar .ql-picker-label.ql-active {
    color: #10b981 !important;
}

.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button:focus .ql-stroke,
.ql-snow .ql-toolbar button:focus .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke {
    stroke: #10b981 !important;
}

.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button:focus .ql-fill,
.ql-snow .ql-toolbar button:focus .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill {
    fill: #10b981 !important;
}

.ql-editor h2 {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.35rem !important;
    color: inherit !important;
}

.ql-editor h3 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    margin-top: 0.6rem !important;
    margin-bottom: 0.25rem !important;
    color: inherit !important;
}

.ql-editor p {
    margin-bottom: 0.5rem !important;
}

.ql-editor blockquote {
    border-left: 4px solid #10b981 !important;
    padding: 0.5rem 1rem !important;
    margin: 0.75rem 0 !important;
    background-color: rgba(16, 185, 129, 0.08) !important;
    border-radius: 0 0.75rem 0.75rem 0 !important;
    font-style: normal !important;
}

.dark .ql-editor blockquote {
    background-color: rgba(16, 185, 129, 0.12) !important;
}

.ql-editor ul, .ql-editor ol {
    padding-left: 1.5rem !important;
    margin-bottom: 0.5rem !important;
}

/* Fullscreen Editor Mode */
.editor-fullscreen-wrapper {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    padding: 1.5rem !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
}

.dark .editor-fullscreen-wrapper {
    background: #090d16 !important;
}

.editor-fullscreen-wrapper .ql-container {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.editor-fullscreen-wrapper .ql-editor {
    flex: 1 !important;
    min-height: 400px !important;
    font-size: 1rem !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    width: 100% !important;
}

