/* Pastor's Study Bible - Modern Mobile UI */

/* Mobile-first responsive design */
@media (max-width: 768px) {
    /* Modern app-like header with blur effect */
    .header {
        padding: 0.5rem 0.75rem;
        min-height: auto;
        height: 60px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        position: sticky;
        top: 0;
        z-index: 100;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Hidden state for immersive reading */
    .header.header-hidden {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }

    .header h1 {
        font-size: 0.9rem;
        margin: 0 !important;
        font-weight: 700;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        flex-shrink: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 45%;
    }

    /* Enhanced mobile buttons */
    .auth-btn-compact {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(52, 152, 219, 0.3);
        color: var(--primary-color);
        font-weight: 600;
        transition: all 0.2s ease;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .auth-btn-compact:hover, .auth-btn-compact:active {
        background: var(--primary-color);
        color: white;
        transform: scale(0.98);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    
    /* Hide login/register buttons on mobile, show profile icon instead */
    .auth-buttons {
        display: none !important;
    }
    
    /* Mobile profile icon */
    .mobile-profile-icon {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    }
    
    .mobile-profile-icon:hover,
    .mobile-profile-icon:active {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    }
    
    /* User info on mobile - compact layout */
    .user-info {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.3rem;
        align-items: center !important;
        flex-wrap: nowrap !important;
        flex-shrink: 0;
    }

    /* Hide user name on mobile to save space */
    .user-name-short {
        display: none !important;
    }

    /* Make reading plan button more compact */
    .reading-plan-dynamic-area {
        display: flex !important;
        align-items: center;
    }

    #userDisplay {
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.3rem;
        flex-wrap: nowrap !important;
    }

    /* Only show userDisplay when it's visible (controlled by JS) */
    #userDisplay:not([style*="display: none"]) {
        display: flex !important;
    }
    
    /* Hide desktop navigation bar on mobile */
    .desktop-navigation-bar {
        display: none !important;
    }

    /* Modern mobile layout with safe areas */
    .main-container {
        flex-direction: column !important;
        height: calc(100vh - 60px);
        padding: var(--spacing-sm);
        gap: 0;
        padding-bottom: env(safe-area-inset-bottom, var(--spacing-sm));
    }

    /* Hide desktop resize handles on mobile */
    .resize-handle,
    .vertical-resize-handle {
        display: none !important;
    }

    /* When notes are hidden on mobile (immersive mode) */
    .notes-container.mobile-hidden {
        display: none !important;
    }

    .mobile-resize-handle.mobile-hidden {
        display: none !important;
    }

    .main-container.notes-hidden .bible-panel {
        flex: 1 1 100% !important;
        max-height: 100% !important;
    }

    /* Mobile resize handle - touch-friendly drag bar between Bible and Notes */
    .mobile-resize-handle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 24px;
        width: 100%;
        background: transparent;
        cursor: ns-resize;
        touch-action: none;
        z-index: 50;
        position: relative;
        flex-shrink: 0;
    }

    .mobile-resize-bar {
        width: 60px;
        height: 5px;
        background: var(--border-color);
        border-radius: 3px;
        transition: all 0.2s ease;
    }

    .mobile-resize-handle:hover .mobile-resize-bar,
    .mobile-resize-handle:active .mobile-resize-bar,
    .mobile-resize-handle.resizing .mobile-resize-bar {
        background: var(--primary-color);
        width: 80px;
        height: 6px;
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    }

    /* Mobile panel split using CSS custom properties */
    .main-container {
        --mobile-bible-height: 50%;
    }

    /* Modern card-style panels */
    .bible-panel {
        flex: 0 0 var(--mobile-bible-height) !important;
        min-height: 100px;
        max-height: calc(100% - 124px); /* Leave room for notes + resize handle */
        width: 100% !important;
        border-radius: 20px 20px 0 0;
        background: white;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        position: relative;
        margin-right: 0 !important;
        padding-top: 60px; /* Create space for main header to sit on top */
    }
    
    /* Hide the old panel-header on mobile */
    .bible-panel .panel-header {
        display: none;
    }
    
    /* Show the new mobile header */
    .bible-panel .mobile-bible-header {
        display: block;
    }
    
    .notes-container {
        flex: 1 1 auto !important;
        min-height: 100px;
        width: 100% !important;
        border-radius: 20px 20px 0 0;
        background: white;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        position: relative;
    }
    
    /* Add subtle gradient overlay to panels */
    .bible-panel::before,
    .notes-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.5), transparent);
        z-index: 1;
    }
    
    /* FORCE hide desktop notes, show mobile notes */
    .desktop-notes {
        display: none !important;
    }
    
    .mobile-notes {
        display: flex !important;
        flex-direction: column;
        height: 100%;
    }
    
    /* Completely reimagined mobile navigation */
    .header-row {
        display: none; /* Hide the cluttered old navigation */
    }
    
    /* Mobile notes toggle button */
    .mobile-notes-toggle {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: var(--primary-color);
        color: white;
        border: none;
        font-size: 1.3rem;
        cursor: pointer;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.5);
        transition: all 0.2s ease;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .mobile-notes-toggle:active {
        transform: scale(0.95);
    }

    .mobile-notes-toggle.notes-hidden {
        background: var(--border-color);
    }

    /* New clean mobile Bible header */
    .mobile-bible-header {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding: var(--spacing-md);
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        z-index: 50;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Hidden state for mobile Bible header */
    .mobile-bible-header.header-hidden {
        transform: translateY(calc(-100% - 60px));
        opacity: 0;
        pointer-events: none;
    }
    
    /* Current passage display - clean and minimal */
    .mobile-passage-display {
        text-align: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .current-passage-title {
        font-size: var(--font-size-lg);
        font-weight: 700;
        color: var(--primary-color);
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 4px;
    }
    
    .passage-meta {
        font-size: var(--font-size-xs);
        color: var(--text-secondary);
        font-weight: 500;
    }
    
    /* Single search bar with integrated actions */
    .mobile-unified-search {
        position: relative;
    }
    
    .unified-search-input {
        width: 100%;
        padding: var(--spacing-md) 60px var(--spacing-md) var(--spacing-md);
        border: 2px solid rgba(52, 152, 219, 0.2);
        border-radius: 25px;
        font-size: 16px; /* Prevents zoom on iOS */
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        transition: all 0.2s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }
    
    .unified-search-input:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        background: white;
    }
    
    .unified-search-actions {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        gap: 4px;
    }
    
    .unified-action-btn {
        width: 36px;
        height: 36px;
        border: none;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    }
    
    .unified-action-btn:active {
        transform: scale(0.95);
    }
    
    .unified-action-btn.browse {
        background: rgba(255, 255, 255, 0.9);
        color: var(--primary-color);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Mobile search suggestions */
    .mobile-search-suggestions {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 15px;
        margin-top: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        display: none;
        z-index: 1000;
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mobile-suggestion-item {
        padding: var(--spacing-md);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        min-height: 44px;
    }
    
    .mobile-suggestion-item:last-child {
        border-bottom: none;
    }
    
    .mobile-suggestion-item:hover,
    .mobile-suggestion-item:active {
        background: rgba(52, 152, 219, 0.1);
        transform: translateX(4px);
    }
    
    .suggestion-icon {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: bold;
        flex-shrink: 0;
    }
    
    .suggestion-icon.verse {
        background: linear-gradient(135deg, var(--success-color), #27ae60);
    }
    
    .suggestion-icon.search {
        background: linear-gradient(135deg, #f39c12, #e67e22);
    }
    
    .suggestion-text {
        flex: 1;
    }
    
    .suggestion-title {
        font-weight: 600;
        color: var(--text-primary);
        font-size: var(--font-size-sm);
        margin-bottom: 2px;
    }
    
    .suggestion-subtitle {
        font-size: var(--font-size-xs);
        color: var(--text-secondary);
    }
    
    .suggestion-action {
        font-size: var(--font-size-xs);
        color: var(--primary-color);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Navigation arrows - floating and minimal */
    .mobile-nav-arrows {
        position: fixed;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 100px);
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: var(--spacing-lg);
        z-index: 100;
        pointer-events: none; /* Allow taps to go through when disabled */
    }
    
    .mobile-nav-btn {
        width: 48px;
        height: 48px;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        color: var(--primary-color);
        font-size: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        transition: all 0.3s ease;
        pointer-events: auto;
    }
    
    .mobile-nav-btn:enabled {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        box-shadow: 0 6px 25px rgba(52, 152, 219, 0.4);
    }
    
    .mobile-nav-btn:disabled {
        opacity: 0.3;
        transform: scale(0.8);
    }
    
    .mobile-nav-btn:enabled:active {
        transform: scale(0.95);
    }
    
    .breadcrumb-nav .nav-link {
        color: var(--primary-color);
        text-decoration: none;
        padding: 0.25rem 0.5rem;
        border-radius: 8px;
        transition: all 0.2s ease;
    }
    
    .breadcrumb-nav .nav-link:hover,
    .breadcrumb-nav .nav-link:active {
        background: rgba(52, 152, 219, 0.1);
        transform: scale(1.05);
    }
    
    .quick-actions {
        width: 100%;
        justify-content: space-between;
        gap: var(--spacing-sm);
    }
    
    /* Modern mobile search */
    .search-inline {
        flex: 1;
        width: auto;
        font-size: var(--font-size-sm);
        padding: 0.75rem 1rem;
        border-radius: 25px;
        border: 2px solid rgba(52, 152, 219, 0.2);
        background: rgba(255, 255, 255, 0.9);
        transition: all 0.2s ease;
    }
    
    .search-inline:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        background: white;
    }
    
    /* Enhanced action buttons */
    .action-btn {
        padding: 0.6rem 1rem;
        font-size: var(--font-size-sm);
        border-radius: 20px;
        font-weight: 600;
        border: 2px solid transparent;
        transition: all 0.2s ease;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    }
    
    .action-btn:hover,
    .action-btn:active {
        transform: translateY(-1px) scale(1.02);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    }
    
    /* Enhanced mobile modals */
    .modal-overlay,
    .picker-modal {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    
    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        padding: var(--spacing-lg);
        position: relative;
        top: 0;
        left: 0;
        transform: none !important;
    }
    
    /* Modern passage picker */
    .picker-content {
        padding: var(--spacing-md);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .picker-header {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        padding: var(--spacing-lg);
        margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-lg) calc(-1 * var(--spacing-lg));
        border-radius: 0;
        position: sticky;
        top: calc(-1 * var(--spacing-lg));
        z-index: 10;
    }
    
    .picker-close {
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: none;
        border-radius: 50%;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Enhanced category cards */
    .category-card {
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 20px;
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-md);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        transition: all 0.2s ease;
        min-height: 44px;
        cursor: pointer;
    }
    
    .category-card:hover,
    .category-card:active {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
        background: rgba(255, 255, 255, 1);
        border-color: var(--primary-color);
    }
    
    .category-title {
        font-size: var(--font-size-lg);
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: var(--spacing-sm);
    }
    
    .category-books {
        font-size: var(--font-size-sm);
        color: var(--text-secondary);
        line-height: 1.5;
    }
    
    /* Book and chapter grids */
    .book-grid,
    .navigation-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: var(--spacing-md);
        margin-top: var(--spacing-md);
    }
    
    .book-card,
    .nav-btn {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid rgba(52, 152, 219, 0.2);
        border-radius: 15px;
        padding: var(--spacing-md);
        text-align: center;
        font-weight: 600;
        color: var(--primary-color);
        transition: all 0.2s ease;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        cursor: pointer;
    }
    
    .book-card:hover,
    .book-card:active,
    .nav-btn:hover,
    .nav-btn:active {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        transform: scale(1.02);
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .navigation-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    }
    
    /* Profile Modal Mobile */
    .profile-modal-content {
        width: 98%;
        max-height: 95vh;
        margin: var(--spacing-md);
    }
    
    .profile-header {
        padding: var(--spacing-md);
    }
    
    .profile-header h2 {
        font-size: var(--font-size-lg);
    }
    
    .profile-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .profile-tab-btn {
        padding: 0.8rem var(--spacing-md);
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .profile-tab-content {
        padding: var(--spacing-md);
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .stat-number {
        font-size: var(--font-size-xl);
    }
    
    .data-section {
        padding: var(--spacing-md);
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .quick-actions {
        flex-wrap: wrap;
    }
    
    .search-inline {
        width: 100%;
        margin-bottom: 0.3rem;
    }
    
    .action-btn {
        flex: 1;
    }
    
    /* Even smaller text for space saving */
    .breadcrumb-nav {
        font-size: var(--font-size-xs);
    }
    
    .breadcrumb-item {
        padding: 0.15rem 0.3rem;
        font-size: var(--font-size-xs);
    }
}

/* Additional mobile-specific overrides for common devices */
@media screen and (max-device-width: 768px) {
    .desktop-notes {
        display: none !important;
    }
    
    .mobile-notes {
        display: flex !important;
    }
    
    .main-container {
        flex-direction: column !important;
    }
}

/* Responsive breadcrumbs */
@media (max-width: 768px) {
    .breadcrumb-nav {
        font-size: var(--font-size-sm);
        gap: 0.25rem;
    }
    
    .breadcrumb-item {
        padding: 0.2rem 0.4rem;
        font-size: var(--font-size-sm);
    }
    
    .breadcrumb-separator {
        margin: 0 0.1rem;
    }
    
    /* Hide some breadcrumb items on very small screens */
    @media (max-width: 480px) {
        .breadcrumb-nav .breadcrumb-item:nth-child(n+7):not(.breadcrumb-current) {
            display: none;
        }
        
        .breadcrumb-nav .breadcrumb-separator:nth-child(n+6) {
            display: none;
        }
    }
}

/* Orientation change handling */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .profile-modal-content {
        max-height: 98vh;
    }
    
    .profile-tab-content {
        padding: var(--spacing-sm);
    }
    
    .profile-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-sm);
    }
    
    .stat-card {
        padding: var(--spacing-sm);
    }
    
    .stat-number {
        font-size: var(--font-size-lg);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-btn,
    .book-card,
    .category-card,
    .btn,
    .tab-btn,
    .profile-tab-btn {
        min-height: 44px; /* iOS recommended touch target size */
        min-width: 44px;
    }
    
    .add-note-btn {
        opacity: 1; /* Always visible on touch devices */
    }
    
    /* Larger touch targets */
    .breadcrumb-item {
        min-height: 32px;
        display: flex;
        align-items: center;
    }
}

/* Simplified mobile notes - hide search and filter controls */
@media (max-width: 768px) {
    .mobile-notes .notes-controls {
        display: none !important;
    }
}

/* Enhanced Mobile Notes System */
@media (max-width: 768px) {
    /* Modern mobile tabs with smooth transitions */
    .mobile-tabs {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding: var(--spacing-xs) var(--spacing-md);
        display: flex;
        justify-content: center;
        gap: var(--spacing-sm);
    }
    
    .mobile-tab-btn {
        padding: 0.6rem 1.2rem;
        border: none;
        background: rgba(255, 255, 255, 0.7);
        color: var(--text-secondary);
        border-radius: 20px;
        font-weight: 600;
        font-size: var(--font-size-sm);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .mobile-tab-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.6s;
    }
    
    .mobile-tab-btn:hover::before {
        left: 100%;
    }
    
    .mobile-tab-btn.active {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    
    /* Enhanced note display */
    .note-item {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 15px;
        margin-bottom: var(--spacing-md);
        padding: var(--spacing-md);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.2s ease;
    }
    
    .note-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    }
    
    .note-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .note-reference {
        font-weight: 700;
        color: var(--primary-color);
        font-size: var(--font-size-sm);
        background: rgba(52, 152, 219, 0.1);
        padding: 0.3rem 0.8rem;
        border-radius: 12px;
    }
    
    .note-actions {
        display: flex;
        gap: var(--spacing-xs);
    }
    
    .note-action-btn {
        width: 32px;
        height: 32px;
        border: none;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.8);
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .note-action-btn:hover,
    .note-action-btn:active {
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
    }
    
    .note-content {
        line-height: 1.6;
        color: var(--text-primary);
        font-size: var(--font-size-sm);
    }
    
    /* Modern inline add note buttons for mobile */
    .add-note-btn {
        position: absolute;
        right: var(--spacing-sm);
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 2px solid rgba(52, 152, 219, 0.3);
        color: var(--primary-color);
        font-size: 1rem;
        font-weight: 600;
        box-shadow: 0 2px 12px rgba(52, 152, 219, 0.2);
        z-index: 10;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
    }
    
    /* Show add note button on verse tap/touch or when verse is focused */
    .verse.active .add-note-btn,
    .verse:focus-within .add-note-btn,
    .verse.selected .add-note-btn {
        opacity: 1;
        pointer-events: auto;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        border-color: transparent;
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    }
    
    .add-note-btn:active {
        transform: translateY(-50%) scale(0.95);
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    }
    
    /* Enhanced verse styling for mobile interaction */
    .verse {
        position: relative;
        padding: var(--spacing-md) 50px var(--spacing-md) var(--spacing-md);
        margin-bottom: var(--spacing-sm);
        border-radius: var(--border-radius-medium);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        border: 1px solid transparent;
    }
    
    .verse:hover,
    .verse.active,
    .verse:focus-within,
    .verse.selected {
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(52, 152, 219, 0.2);
        transform: translateY(-1px);
    }
    
    /* Verse selection state management */
    .verse.selected {
        background: rgba(52, 152, 219, 0.1);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    }
    
    /* Modern modal presentations */
    .modal-overlay {
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    
    .modal-content {
        border-radius: 20px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.95);
    }
    
    /* Smooth loading states */
    .loading-shimmer {
        background: linear-gradient(90deg, 
            rgba(255, 255, 255, 0.0) 0%, 
            rgba(255, 255, 255, 0.8) 50%, 
            rgba(255, 255, 255, 0.0) 100%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
    }
    
    @keyframes shimmer {
        0% { background-position: -200% 0; }
        100% { background-position: 200% 0; }
    }
    
    /* Enhanced search results */
    .search-results {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 15px;
        margin-top: var(--spacing-sm);
        max-height: 60vh;
        overflow-y: auto;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .search-result-item {
        padding: var(--spacing-md);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;
    }
    
    .search-result-item:last-child {
        border-bottom: none;
    }
    
    .search-result-item:hover,
    .search-result-item:active {
        background: rgba(52, 152, 219, 0.1);
        transform: translateX(4px);
    }
    
    /* Reading plan mobile enhancements */
    .reading-plan-card {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-md);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .reading-checkbox {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: 2px solid var(--primary-color);
        background: white;
        position: relative;
        transition: all 0.2s ease;
    }
    
    .reading-checkbox:checked {
        background: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .reading-checkbox:checked::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-weight: bold;
        font-size: 12px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .verse-number,
    .suggestion-meta,
    .note-actions button {
        font-size: calc(var(--font-size-xs) + 1px); /* Slightly larger on high DPI */
    }
}

/* PWA-style enhancements */
@media (max-width: 768px) {
    /* Safe area handling for modern phones */
    .main-container {
        padding-top: max(var(--spacing-sm), env(safe-area-inset-top));
        padding-bottom: max(var(--spacing-sm), env(safe-area-inset-bottom));
        padding-left: max(var(--spacing-sm), env(safe-area-inset-left));
        padding-right: max(var(--spacing-sm), env(safe-area-inset-right));
    }
    
    /* Smooth scroll behavior */
    .bible-content,
    .notes-content {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Add padding to account for sticky headers when scrolling to verses */
    .bible-content {
        padding-top: 8px;
        scroll-padding-top: 130px; /* Account for main header (60px) + mobile-bible-header (~70px) */
    }
    
    /* Pull-to-refresh indicator */
    .pull-refresh-indicator {
        position: absolute;
        top: -60px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    /* Haptic feedback simulation */
    .btn:active,
    .mobile-tab-btn:active,
    .note-action-btn:active {
        transform: scale(0.95);
    }

    /* Native gesture feedback */
    .touch-feedback {
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .touch-feedback:active {
        transform: scale(0.97);
        opacity: 0.8;
    }

    /* Swipe gesture indicators */
    .swipe-indicator {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 1000;
        pointer-events: none;
    }

    .swipe-indicator.left {
        right: 20px;
    }

    .swipe-indicator.right {
        left: 20px;
    }

    .swipe-indicator.show {
        opacity: 1;
    }

    /* Enhanced pull-to-refresh */
    .pull-refresh-container {
        position: relative;
        overflow: hidden;
    }

    .pull-refresh-indicator {
        position: absolute;
        top: -80px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        z-index: 1000;
        color: #666;
        font-size: 14px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .refresh-spinner {
        width: 24px;
        height: 24px;
        border: 2px solid #ddd;
        border-top: 2px solid var(--primary-color);
        border-radius: 50%;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .refresh-spinner.spinning {
        animation: spin 1s linear infinite;
    }

    .refresh-text {
        font-weight: 600;
        white-space: nowrap;
    }

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

    /* iOS-specific enhancements */
    .ios-device .header {
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        background: rgba(248, 249, 250, 0.8);
    }

    .ios-device .tab-btn {
        border-radius: 16px;
        font-weight: 600;
        letter-spacing: -0.01em;
    }

    .ios-device .tab-btn.active {
        background: var(--primary-color);
        color: white;
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    }

    .ios-device .modal-content {
        border-radius: 28px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
    }

    /* Android-specific enhancements */
    .android-device .tab-btn {
        border-radius: 8px;
        text-transform: uppercase;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.5px;
    }

    .android-device .tab-btn.active {
        background: var(--primary-color);
        color: white;
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    }

    /* Material Design ripple effect */
    @keyframes ripple {
        to {
            transform: scale(2);
            opacity: 0;
        }
    }

    /* Floating Action Button */
    .floating-action-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--primary-color);
        color: white;
        border: none;
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        z-index: 1000;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
    }

    .floating-action-button:hover {
        background: #2980b9;
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
    }

    .floating-action-button:active {
        transform: scale(0.95);
    }

    /* Enhanced tab transitions */
    .notes-tab-panel {
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                   transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .notes-tab-panel:not(.active) {
        opacity: 0;
        transform: translateX(20px);
        pointer-events: none;
    }

    .notes-tab-panel.active {
        opacity: 1;
        transform: translateX(0);
    }

    /* Native scroll physics */
    .native-scroll {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Progressive Web App enhancements */
    .pwa-header {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }

    /* Smooth note animations */
    .note-item {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(10px);
        opacity: 0;
    }

    .note-item.visible {
        transform: translateY(0);
        opacity: 1;
    }

    /* Enhanced loading states */
    .loading-pulse {
        animation: pulse 1.5s ease-in-out infinite;
    }

    @keyframes pulse {
        0%, 100% { opacity: 1; }
        50% { opacity: 0.5; }
    }

    /* Native-feeling form elements */
    input[type="text"],
    input[type="password"],
    input[type="email"],
    textarea {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    input[type="text"]:focus,
    input[type="password"]:focus,
    input[type="email"]:focus,
    textarea:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
        background: white;
    }

    /* Status bar padding for iOS */
    @supports (padding-top: env(safe-area-inset-top)) {
        .header {
            padding-top: calc(env(safe-area-inset-top) + 10px);
        }

        .main-container {
            padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
        }
    }
}

/* ==========================================
   Dark Mode - Mobile Overrides
   ========================================== */

@media (max-width: 768px) {
    /* Dark mode header */
    [data-theme="dark"] .header {
        background: rgba(26, 32, 44, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Dark mode auth buttons */
    [data-theme="dark"] .auth-btn-compact {
        background: rgba(45, 55, 72, 0.9);
        border: 1px solid rgba(74, 158, 222, 0.3);
        color: var(--primary-color);
    }

    [data-theme="dark"] .auth-btn-compact:hover,
    [data-theme="dark"] .auth-btn-compact:active {
        background: var(--primary-color);
        color: white;
    }

    /* Dark mode panels */
    [data-theme="dark"] .bible-panel,
    [data-theme="dark"] .notes-container {
        background: var(--bg-white);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .bible-panel::before,
    [data-theme="dark"] .notes-container::before {
        background: linear-gradient(90deg, transparent, rgba(74, 158, 222, 0.5), transparent);
    }

    /* Dark mode mobile Bible header */
    [data-theme="dark"] .mobile-bible-header {
        background: rgba(26, 32, 44, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Dark mode search input */
    [data-theme="dark"] .unified-search-input {
        border: 2px solid rgba(74, 158, 222, 0.3);
        background: rgba(26, 32, 44, 0.9);
        color: var(--text-dark);
    }

    [data-theme="dark"] .unified-search-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(74, 158, 222, 0.2);
        background: var(--bg-body);
    }

    [data-theme="dark"] .unified-search-input::placeholder {
        color: var(--text-muted);
    }

    /* Dark mode search suggestions */
    [data-theme="dark"] .mobile-search-suggestions {
        background: rgba(45, 55, 72, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .mobile-suggestion-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    [data-theme="dark"] .mobile-suggestion-item:hover,
    [data-theme="dark"] .mobile-suggestion-item:active {
        background: rgba(74, 158, 222, 0.2);
    }

    /* Dark mode nav buttons */
    [data-theme="dark"] .mobile-nav-btn {
        background: rgba(45, 55, 72, 0.95);
        color: var(--primary-color);
    }

    [data-theme="dark"] .mobile-nav-btn:enabled {
        background: linear-gradient(135deg, var(--primary-color), #5aaeee);
        color: white;
    }

    /* Dark mode category cards */
    [data-theme="dark"] .category-card {
        background: rgba(45, 55, 72, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .category-card:hover,
    [data-theme="dark"] .category-card:active {
        background: rgba(74, 85, 104, 1);
        border-color: var(--primary-color);
    }

    /* Dark mode book and chapter cards */
    [data-theme="dark"] .book-card,
    [data-theme="dark"] .nav-btn {
        background: rgba(45, 55, 72, 0.9);
        border: 2px solid rgba(74, 158, 222, 0.3);
        color: var(--primary-color);
    }

    /* Dark mode notes */
    [data-theme="dark"] .note-item {
        background: rgba(45, 55, 72, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .note-action-btn {
        background: rgba(26, 32, 44, 0.8);
        color: var(--text-secondary);
    }

    [data-theme="dark"] .note-action-btn:hover,
    [data-theme="dark"] .note-action-btn:active {
        background: var(--primary-color);
        color: white;
    }

    /* Dark mode tabs */
    [data-theme="dark"] .mobile-tabs {
        background: rgba(26, 32, 44, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .mobile-tab-btn {
        background: rgba(45, 55, 72, 0.7);
        color: var(--text-secondary);
    }

    [data-theme="dark"] .mobile-tab-btn.active {
        background: linear-gradient(135deg, var(--primary-color), #5aaeee);
        color: white;
    }

    /* Dark mode verse styling */
    [data-theme="dark"] .verse:hover,
    [data-theme="dark"] .verse.active,
    [data-theme="dark"] .verse:focus-within,
    [data-theme="dark"] .verse.selected {
        background: rgba(45, 55, 72, 0.8);
        border: 1px solid rgba(74, 158, 222, 0.3);
    }

    [data-theme="dark"] .verse.selected {
        background: rgba(74, 158, 222, 0.2);
        border-color: var(--primary-color);
    }

    /* Dark mode add note button */
    [data-theme="dark"] .add-note-btn {
        background: rgba(45, 55, 72, 0.9);
        border: 2px solid rgba(74, 158, 222, 0.3);
        color: var(--primary-color);
    }

    /* Dark mode modals */
    [data-theme="dark"] .modal-content {
        background: rgba(45, 55, 72, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .picker-content {
        background: var(--bg-white);
    }

    /* Dark mode search results */
    [data-theme="dark"] .search-results {
        background: rgba(45, 55, 72, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .search-result-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    [data-theme="dark"] .search-result-item:hover,
    [data-theme="dark"] .search-result-item:active {
        background: rgba(74, 158, 222, 0.2);
    }

    /* Dark mode reading plan */
    [data-theme="dark"] .reading-plan-card {
        background: rgba(45, 55, 72, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Dark mode form elements */
    [data-theme="dark"] input[type="text"],
    [data-theme="dark"] input[type="password"],
    [data-theme="dark"] input[type="email"],
    [data-theme="dark"] textarea {
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(26, 32, 44, 0.9);
        color: var(--text-dark);
    }

    [data-theme="dark"] input[type="text"]:focus,
    [data-theme="dark"] input[type="password"]:focus,
    [data-theme="dark"] input[type="email"]:focus,
    [data-theme="dark"] textarea:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(74, 158, 222, 0.2);
        background: var(--bg-body);
    }

    /* Dark mode pull refresh */
    [data-theme="dark"] .pull-refresh-indicator {
        background: rgba(45, 55, 72, 0.9);
        color: var(--text-secondary);
    }

    [data-theme="dark"] .refresh-spinner {
        border: 2px solid rgba(255, 255, 255, 0.1);
        border-top: 2px solid var(--primary-color);
    }

    /* Dark mode floating action button */
    [data-theme="dark"] .floating-action-button {
        background: var(--primary-color);
        box-shadow: 0 6px 20px rgba(74, 158, 222, 0.5);
    }

    /* Dark mode notes toggle */
    [data-theme="dark"] .mobile-notes-toggle {
        background: var(--primary-color);
        box-shadow: 0 4px 12px rgba(74, 158, 222, 0.5);
    }

    [data-theme="dark"] .mobile-notes-toggle.notes-hidden {
        background: var(--bg-secondary);
    }

    /* Dark mode resize handle */
    [data-theme="dark"] .mobile-resize-bar {
        background: var(--border-light);
    }

    [data-theme="dark"] .mobile-resize-handle:hover .mobile-resize-bar,
    [data-theme="dark"] .mobile-resize-handle:active .mobile-resize-bar,
    [data-theme="dark"] .mobile-resize-handle.resizing .mobile-resize-bar {
        background: var(--primary-color);
    }

    /* Dark mode iOS-specific */
    [data-theme="dark"].ios-device .header {
        background: rgba(26, 32, 44, 0.8);
    }

    [data-theme="dark"].ios-device .modal-content {
        background: rgba(45, 55, 72, 0.95);
    }
}

/* Auto dark mode for mobile - system preference */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    [data-theme="auto"] .header {
        background: rgba(26, 32, 44, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="auto"] .bible-panel,
    [data-theme="auto"] .notes-container {
        background: var(--bg-white);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    [data-theme="auto"] .mobile-bible-header {
        background: rgba(26, 32, 44, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="auto"] .unified-search-input {
        border: 2px solid rgba(74, 158, 222, 0.3);
        background: rgba(26, 32, 44, 0.9);
        color: var(--text-dark);
    }

    [data-theme="auto"] .mobile-tabs {
        background: rgba(26, 32, 44, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="auto"] .note-item {
        background: rgba(45, 55, 72, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    [data-theme="auto"] .modal-content {
        background: rgba(45, 55, 72, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}