/* ============================================================
   PORTFOLIO-INSPIRED DARK THEME DESIGN
   ============================================================ */

/* Portfolio-Inspired Color Variables */
:root {
    --spacing-1: 4px;
    /* 0.25rem */
    --spacing-2: 8px;
    /* 0.5rem */
    --spacing-3: 12px;
    /* 0.75rem */
    --spacing-4: 16px;
    /* 1rem */
    --spacing-5: 20px;
    /* 1.25rem */
    --spacing-6: 24px;
    /* 1.5rem */
    --spacing-8: 32px;
    /* 2rem */

    /* Portfolio Color Palette */
    --primary-blue: #3b82f6;
    --primary-blue-dark: #1e3a8a;
    --primary-blue-light: #60a5fa;
    --bg-main: #000000;
    --bg-card: #0a0a0a;
    --bg-card-light: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --border-color-light: #4b5563;
    
    /* Font Size Scale - Standard Professional Sizes */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 28px;
    --text-4xl: 32px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Portfolio-Inspired Main Background */
.gradient-bg {
    background: var(--bg-main);
    position: relative;
}


/* Portfolio-Inspired Blue Text */
.gradient-text {
    color: var(--primary-blue);
}

/* Portfolio-Inspired Header */
.glass-header {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
}

.glass-sidebar {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-right: 1px solid var(--border-color);
}

.glass-card {
    background: rgba(22, 27, 34, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(33, 38, 45, 0.3);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.glass-button {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.glass-button:hover {
    background: rgba(40, 40, 40, 0.95);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.glass-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.glass-input {
    background: rgba(25, 25, 25, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.glass-input:focus {
    outline: none;
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}

.glass-modal {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Solid Blue Button */
.gradient-button {
    background: #3b82f6;
    border: none;
    color: white;
    font-weight: 600;
}

.gradient-button:hover {
    background: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.gradient-button:active {
    transform: translateY(0);
}

/* Custom Scrollbar - Pure Black Theme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.6);
    background-clip: padding-box;
}

/* Selection */
::selection {
    background: rgba(59, 130, 246, 0.4);
    color: white;
}

/* Focus Styles */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
}

/* Range Slider - Pure Black Theme */
.glass-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.8);
    outline: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.glass-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.glass-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4);
}

.glass-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.glass-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4);
}

/* Verse Container */
#versesContainer {
    font-size: 18px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* Portfolio-Inspired Verse Card */
.verse-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.verse-card:hover {
    background: var(--bg-card);
    border-color: var(--border-color-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Portfolio-Inspired Verse Number */
.verse-number {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9em;
    margin-right: 0.5em;
    display: inline-block;
}

/* Sidebar Styles - Pure Black Theme */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
    position: relative;
    z-index: 1;
}

/* Responsive Sidebar Widths */
@media (min-width: 1024px) {
    .sidebar {
        width: 320px;
        /* Increased from 288px */
    }
}

@media (min-width: 1280px) {
    .sidebar {
        width: 360px;
        /* Even larger for large desktops */
    }
}

@media (min-width: 1536px) {
    .sidebar {
        width: 400px;
        /* Extra large for very wide screens */
    }
}

/* Tablet Sidebar Adjustment */
@media (min-width: 768px) and (max-width: 1023px) {
    .sidebar {
        width: 280px;
        /* Slightly smaller for tablets */
    }
}

/* Portfolio-Inspired Sidebar Design */
.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--spacing-4);
    margin-bottom: var(--spacing-4);
    transition: all 0.2s ease;
}

.sidebar-section:hover {
    background: var(--bg-card);
    border-color: var(--border-color-light);
}

.sidebar-title {
    color: var(--primary-blue);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-3);
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.sidebar-title::before {
    content: '';
    width: 3px;
    height: 12px;
    background: #3b82f6;
    border-radius: 2px;
}

.book-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-2) var(--spacing-3);
    margin-bottom: var(--spacing-1);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.book-item:hover {
    background: var(--bg-card);
    border-color: var(--primary-blue);
    transform: translateX(2px);
    color: var(--text-primary);
}

.book-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-blue);
    color: var(--text-primary);
}

.filter-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-3);
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-2) var(--spacing-1);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.filter-btn:hover {
    background: var(--bg-card);
    border-color: var(--border-color-light);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-2);
}

.chapter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: var(--spacing-2) var(--spacing-1);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chapter-btn:hover {
    background: var(--bg-card);
    border-color: var(--primary-blue);
    color: var(--text-primary);
    transform: scale(1.05);
}

.chapter-btn.active {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Chapter Badge - Clean Dark Design */
.chapter-badge {
    background: rgba(33, 38, 45, 0.8);
    border: 1px solid rgba(33, 38, 45, 0.3);
    border-radius: 6px;
    padding: var(--spacing-2) var(--spacing-1);
    font-size: var(--text-xs);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chapter-badge:hover {
    background: rgba(33, 38, 45, 0.9);
    border-color: rgba(33, 38, 45, 0.4);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chapter-badge.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Loading Spinner */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Portfolio-Inspired Search Highlight */
mark {
    background: var(--primary-blue);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 60px; /* Position below header */
        height: calc(100vh - 60px); /* Account for header height */
        z-index: 40; /* Below header (z-index: 50) */
    }
    
    /* Portfolio-Inspired Mobile Footer */
    .bottom-navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 45; /* Above sidebar but below header */
        background: var(--bg-card);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        padding: 1rem;
    }
}

/* Print Styles */
@media print {

    header,
    aside,
    button,
    #fontSizeModal,
    #loadingIndicator,
    #sidebarOverlay {
        display: none !important;
    }

    body {
        background: white !important;
    }

    #versesContainer {
        font-size: 12pt;
        line-height: 1.6;
    }

    #versesContainer * {
        color: black !important;
    }

    .verse-card {
        background: transparent !important;
        border: 1px solid #333 !important;
    }
}

/* Touch Feedback */
@media (hover: none) and (pointer: coarse) {
    button:active {
        transform: scale(0.96);
    }
}

/* Prevent Text Selection on UI Elements */
button,
.glass-button,
.glass-card button {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, transform, box-shadow;
    transition-duration: 200ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}

/* Active/Selected States */
.active-item {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Divider Lines */
.divider {
    border-color: rgba(255, 255, 255, 0.06);
}