﻿        /* ==============================
           SPLASH SCREEN
        ============================== */
        #splash-screen {
            position: fixed;
            inset: 0;
            background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            color: white;
            gap: var(--space-sm);
            transition: transform 0.7s var(--ease-snap-out), opacity 0.5s var(--ease-standard);
        }

        #splash-screen::before {
            content: '';
            position: absolute;
            inset: 0;
            background: 
                radial-gradient(ellipse at 20% 50%, rgba(96, 165, 250, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(251, 191, 36, 0.06) 0%, transparent 50%);
            pointer-events: none;
        }

        .splash-ornament {
            width: 120px;
            height: 120px;
            border-radius: 32px;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.12);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: var(--space-2xl);
            backdrop-filter: blur(20px);
            animation: splashPulse 3s ease-in-out infinite;
            box-shadow: 
                0 0 60px rgba(96, 165, 250, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
            position: relative;
            z-index: 1;
        }

        .splash-ornament .material-icons-round {
            font-size: 56px;
            background: linear-gradient(135deg, #60a5fa, #fbbf24);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        @keyframes splashPulse {
            0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(96, 165, 250, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
            50% { transform: scale(1.03); box-shadow: 0 0 80px rgba(96, 165, 250, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
        }

        @keyframes splashExit {
            0% { 
                transform: translateY(0) scale(1); 
                opacity: 1;
                filter: blur(0);
            }
            40% {
                transform: translateY(-10%) scale(1.02); 
                opacity: 0.8;
                filter: blur(1px);
            }
            100% { 
                transform: translateY(-100%) scale(0.98); 
                opacity: 0;
                filter: blur(6px);
            }
        }

        .btn-start-hover {
            animation: buttonPulse 2s ease-in-out infinite;
        }

        @keyframes buttonPulse {
            0%, 100% { box-shadow: 0 4px 20px rgba(96, 165, 250, 0.2); }
            50% { box-shadow: 0 8px 40px rgba(96, 165, 250, 0.35), 0 0 30px rgba(251, 191, 36, 0.15); }
        }

        #splash-screen h1 {
            font-size: var(--text-3xl);
            font-weight: 800;
            letter-spacing: 6px;
            text-align: center;
            position: relative;
            z-index: 1;
        }
        }

        #splash-screen .splash-sub {
            font-size: var(--text-sm);
            letter-spacing: 3px;
            opacity: 0.5;
            text-transform: uppercase;
            position: relative;
            z-index: 1;
        }

        .btn-start {
            margin-top: var(--space-5xl);
            padding: 16px 56px;
            border-radius: var(--radius-full);
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(16px);
            color: white;
            font-weight: 700;
            font-size: var(--text-md);
            cursor: pointer;
            letter-spacing: 3px;
            font-family: var(--font-main);
            transition: all 0.35s var(--space-xs) var(--ease-standard);
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            z-index: 1;
        }

        .btn-start::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
            transition: left 0.5s ease;
        }

        .btn-start:hover::before { left: 100%; }

        .btn-start:hover { 
            transform: translateY(-3px); 
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
            border-color: rgba(255, 255, 255, 0.4);
            background: rgba(255, 255, 255, 0.12);
        }

        .btn-start:active { 
            transform: scale(0.96) translateY(-1px); 
            background: rgba(255, 255, 255, 0.18);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        /* ==============================
           PROGRESS BAR
        ============================== */
        #progress-bar {
            position: absolute;
            bottom: -1px;
            left: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent), var(--accent-glow));
            width: 0%;
            transition: width 0.15s ease;
            border-radius: 0 3px 3px 0;
            display: none;
            pointer-events: none;
            animation: pulse 2s ease-in-out infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 0.7; }
            50% { opacity: 1; }
        }

        /* ==============================
           HEADER
        ============================== */
        header {
            position: relative;
            padding: calc(env(safe-area-inset-top) + 12px) var(--space-lg) 12px;
            background: var(--bg);
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 200;
            transition: background-color 0.4s var(--ease-standard), border-color 0.4s var(--ease-standard), box-shadow 0.3s var(--ease-standard);
        }

        header.scrolled {
            box-shadow: var(--shadow-sm);
        }

        header h1 {
            font-size: var(--text-lg);
            font-weight: 700;
            letter-spacing: -0.01em;
        }

        .header-left { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }

        #back-btn {
            display: none;
            cursor: pointer;
            color: var(--primary);
            padding: var(--space-xs);
            flex-shrink: 0;
            border-radius: var(--radius-sm);
            transition: all 0.2s var(--ease-standard);
        }
        #back-btn:hover { transform: translateX(-2px); background: var(--primary-light); }
        #back-btn:active { transform: translateX(0px) scale(0.9); }

        .header-right { display: flex; align-items: center; gap: var(--space-2xs); flex-shrink: 0; }

        /* ==============================
           FONT PILL
        ============================== */
        .font-pill {
            background: var(--surface);
            border-radius: var(--radius-full);
            padding: var(--space-xs) var(--space-md);
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            border: 1px solid var(--border);
        }

        .font-pill button {
            background: none;
            border: none;
            color: var(--text);
            font-weight: 700;
            font-size: var(--text-sm);
            cursor: pointer;
            padding: var(--space-2xs) var(--space-xs);
            font-family: var(--font-main);
            border-radius: var(--radius-xs);
            transition: all 0.15s var(--ease-standard);
        }

        .font-pill button:hover {
            background: var(--primary-light);
            color: var(--primary);
        }

        .icon-btn {
            background: none;
            border: none;
            color: var(--text);
            cursor: pointer;
            padding: var(--space-sm);
            border-radius: var(--radius-sm);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s var(--ease-standard);
            position: relative;
            overflow: hidden;
            min-width: 36px;
            min-height: 36px;
        }

        .icon-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: currentColor;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .icon-btn:hover::after {
            opacity: 0.06;
        }

        .icon-btn:active {
            transform: scale(0.92);
        }

        .icon-btn:active::after {
            opacity: 0.12;
        }

        /* ==============================
           MAIN / VIEWS
        ============================== */
        main {
            height: calc(100dvh - 52px - env(safe-area-inset-top) - 56px - env(safe-area-inset-bottom));
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
            contain: layout style;
        }

        /* ==============================
           VIEW TRANSITIONS
        ============================== */
        .view { 
            display: none; 
            padding: var(--space-xl); 
            opacity: 0; 
            transform: translateY(8px); 
        }

        .view.active { 
            display: block; 
            opacity: 1; 
            transform: translateY(0); 
            animation: viewFadeIn 0.35s var(--ease-spring) forwards;
        }

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

        /* ==============================
           ACCESSIBILITY
        ============================== */
        @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;
            }
        }

        /* ==============================
           RESPONSIVE - TABLET
        ============================== */
        @media (min-width: 768px) {
            main {
                max-width: 680px;
                margin: 0 auto;
            }

            .books-grid {
                grid-template-columns: repeat(3, 1fr);
            }

            .chapters-grid {
                grid-template-columns: repeat(8, 1fr);
            }

            .stats-grid {
                gap: var(--space-md);
            }

            .verse-select-grid {
                grid-template-columns: repeat(8, 1fr);
            }
        }

        /* ==============================
           RESPONSIVE - DESKTOP
        ============================== */
        @media (min-width: 1024px) {
            main {
                max-width: 100%;
            }

            .books-grid {
                grid-template-columns: repeat(4, 1fr);
            }

            .chapters-grid {
                grid-template-columns: repeat(10, 1fr);
            }
        }

        /* ==============================
           LOADING & ERROR STATES
        ============================== */
        .loading-spinner {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: var(--space-4xl);
            color: var(--text-secondary);
        }
        .loading-spinner .material-icons-round {
            font-size: 32px;
            animation: spin 1s linear infinite;
            display: block;
            margin-bottom: var(--space-md);
        }
        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

