/* Base Reset */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: Georgia, serif;
            line-height: 1.7;
            color: #f0f0f0;
            background: #000;
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
        }
        
        /* Parallax Background Container - Ready for images */
        #parallax-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            overflow: hidden;
        }
        
        .parallax-layer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            transition: opacity 1.5s cubic-bezier(0.4, 0.0, 0.2, 1);
            /* Smoother easing curve for more natural transitions */
        }
        
        #parallax-bg-a {
            z-index: 2;
            opacity: 0.3;
        }
        
        #parallax-bg-b {
            z-index: 1;
            opacity: 0;
        }
        
        /* Main Content Container - Above parallax */
        .main-content {
            position: relative;
            z-index: 10;
            min-height: 100vh;
        }
        
        /* Content Container - Red tinted glass effect like live site */
        .content-container {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* Header Section */
        .header {
            text-align: center;
            padding: 60px 20px 40px;
            background: rgba(255, 0, 0, 0.1);
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 0, 0.1);
            border-radius: 15px;
            margin-bottom: 40px;
        }
        
        .header h1 {
            color: yellow;
            font-family: Georgia, serif;
            font-size: 2.8em;
            margin-bottom: 15px;
            font-weight: 600;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
            letter-spacing: 1px;
        }
        
        .header p {
            font-style: italic;
            color: #f5f5dc;
            font-size: 1.2em;
            max-width: 600px;
            margin: 0 auto;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }
        
        /* Chapter Navigator Section - Replacing KJV Reader */
        .chapter-navigator-section {
            text-align: center;
            margin: 40px 0;
            padding: 30px;
            background: rgba(255, 0, 0, 0.1);
            backdrop-filter: blur(5px);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 0, 0.1);
            position: relative;   /* ensure z-index applies */
            z-index: 50;         /* make the whole section stack above later sections */
        }
        
        .chapter-navigator-section h3 {
            color: yellow;
            margin-bottom: 15px;
            font-size: 1.3em;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
        }
        
        .chapter-navigator-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            flex-wrap: wrap;
        }
        
        .chapter-dropdown {
            position: relative;
            display: inline-block;
        }
        
        .chapter-dropdown-btn {
            background: rgba(255, 0, 0, 0.2);
            color: yellow;
            border: 2px solid rgba(255, 255, 0, 0.4);
            padding: 12px 25px;
            font-size: 1.1em;
            font-weight: 600;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
            font-family: Georgia, serif;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
            letter-spacing: 1px;
            min-width: 200px;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .chapter-dropdown-btn:hover {
            background: rgba(255, 0, 0, 0.3);
            border-color: rgba(255, 255, 0, 0.6);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }
        
        .chapter-dropdown-btn .caret {
            transition: transform 0.2s ease;
        }
        
        .chapter-dropdown-btn.is-open .caret {
            transform: rotate(180deg);
        }
        
        .chapter-dropdown-btn * {
            pointer-events: none;
        }
        
        .chapter-dropdown-content {
            display: none;
            position: absolute;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(10px);
            min-width: 250px;
            max-height: 400px;
            overflow-y: auto;
            border: 2px solid rgba(255, 255, 0, 0.3);
            border-radius: 10px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
            z-index: 5000;        /* keep the flyout well above anything inside the section */
            margin-top: 5px;
        }
        
        .chapter-dropdown-content.show {
            display: block;
        }
        
        .chapter-search {
            padding: 10px;
            width: 100%;
            background: rgba(255, 0, 0, 0.1);
            color: #f5f5dc;
            border: 1px solid rgba(255, 255, 0, 0.3);
            border-radius: 5px;
            font-size: 1em;
            font-family: Georgia, serif;
        }
        
        .chapter-search::placeholder {
            color: rgba(245, 245, 220, 0.5);
        }
        
        .chapter-list {
            max-height: 350px;
            overflow-y: auto;
            padding: 5px;
        }
        
        .chapter-item {
            display: block;
            color: #f5f5dc;
            text-decoration: none;
            padding: 10px 15px;
            margin: 2px 0;
            border-radius: 5px;
            transition: all 0.3s ease;
            cursor: pointer;
            background: rgba(255, 0, 0, 0.05);
        }
        
        .chapter-item:hover {
            background: rgba(255, 0, 0, 0.2);
            color: yellow;
            transform: translateX(5px);
        }
        
        .chapter-item.hidden {
            display: none;
        }
        
        .navigate-btn {
            background: rgba(255, 0, 0, 0.2);
            color: yellow;
            border: 2px solid rgba(255, 255, 0, 0.4);
            padding: 12px 25px;
            font-size: 1.1em;
            font-weight: 600;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
            font-family: Georgia, serif;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
            text-decoration: none;
            display: inline-block;
        }
        
        .navigate-btn:hover {
            background: rgba(255, 0, 0, 0.3);
            border-color: rgba(255, 255, 0, 0.6);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }
        
        .navigate-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        /* Scrollbar for chapter list */
        .chapter-list::-webkit-scrollbar {
            width: 8px;
        }
        
        .chapter-list::-webkit-scrollbar-track {
            background: rgba(185, 28, 28, 0.2);
            border-radius: 4px;
        }
        
        .chapter-list::-webkit-scrollbar-thumb {
            background: rgba(241, 196, 15, 0.6);
            border-radius: 4px;
        }
        
        .chapter-list::-webkit-scrollbar-thumb:hover {
            background: rgba(241, 196, 15, 0.8);
        }
        
        /* View Toggle Navigation - Red tinted glass */
        .view-toggle {
            text-align: center;
            margin: 30px 0;
            padding: 20px;
            background: rgba(255, 0, 0, 0.08);
            backdrop-filter: blur(5px);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 0, 0.1);
        }
        
        .toggle-btn {
            background: rgba(255, 0, 0, 0.1);
            color: #f5f5dc;
            border: 2px solid rgba(255, 255, 0, 0.3);
            padding: 12px 24px;
            margin: 0 10px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1em;
            font-family: Georgia, serif;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
        }
        
        .toggle-btn.active {
            background: rgba(255, 0, 0, 0.3);
            color: yellow;
            border-color: yellow;
            box-shadow: 0 4px 15px rgba(255, 255, 0, 0.3);
            font-weight: 600;
        }
        
        .toggle-btn:hover {
            background: rgba(255, 0, 0, 0.2);
            border-color: rgba(255, 255, 0, 0.5);
            transform: translateY(-2px);
        }
        
        /* Content Sections - Red tinted glass containers */
        .content-section {
            background: rgba(255, 0, 0, 0.1);
            backdrop-filter: blur(5px);
            border-radius: 15px;
            padding: 30px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 0, 0.1);
        }
        
        .content-section h2 {
            color: yellow;
            font-family: Georgia, serif;
            font-size: 1.8em;
            margin-bottom: 20px;
            border-bottom: 2px solid rgba(255, 255, 0, 0.3);
            padding-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
        }
        
        .content-section h3 {
            color: yellow;
            font-size: 1.4em;
            margin: 25px 0 15px;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
        }
        
        .content-section p {
            color: #f5f5dc;
            margin-bottom: 15px;
            font-size: 1.1em;
            line-height: 1.8;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }
        
        /* Overview Sections - Expandable */
        .overview-section {
            background: rgba(255, 0, 0, 0.08);
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 20px;
            border: 1px solid rgba(255, 255, 0, 0.2);
        }
        
        .overview-section h3 {
            cursor: pointer;
            user-select: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin: 0;
            padding: 5px 0;
        }
        
        .overview-section h3:after {
            content: '▼';
            font-size: 0.8em;
            transition: transform 0.3s ease;
        }
        
        .overview-section.collapsed h3:after {
            transform: rotate(-90deg);
        }
        
        .overview-content {
            margin-top: 15px;
            transition: all 0.3s ease;
        }
        
        .overview-section.collapsed .overview-content {
            display: none;
        }
        
        /* Story Section styling */
        .story-section {
            background: rgba(255, 0, 0, 0.08);
            padding: 30px;
            border-radius: 15px;
            margin: 40px 0;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 0, 0.1);
        }
        
        .story-section h2 {
            color: yellow;
            margin-top: 0;
            margin-bottom: 25px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
        }
        
        .story-section p {
            margin-bottom: 20px;
            line-height: 1.8;
        }
        
        .story-section p:last-child {
            margin-bottom: 0;
        }
        
        /* PAA Section styling */
        .paa-section {
            background: rgba(255, 0, 0, 0.08);
            padding: 30px;
            border-radius: 15px;
            margin: 40px 0;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 0, 0.1);
        }
        
        .paa-question {
            margin-bottom: 30px;
            border-left: 3px solid yellow;
            padding-left: 20px;
            background: rgba(255, 0, 0, 0.05);
            padding: 20px;
            border-radius: 8px;
            backdrop-filter: blur(5px);
        }
        
        .paa-question h3 {
            color: yellow;
            margin-bottom: 10px;
            font-size: 1.1em;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
        }
        
        .paa-question p {
            color: #f5f5dc;
            line-height: 1.8;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }
        
        /* View Content sections */
        .view-content {
            display: none;
        }
        
        .view-content.active {
            display: block;
        }
        
        footer {
            text-align: center;
            margin-top: 60px;
            padding: 20px;
            background: rgba(255, 0, 0, 0.05);
            backdrop-filter: blur(5px);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 0, 0.1);
            color: #f5f5dc;
            font-size: 0.9em;
        }
        
        /* Loading spinner styles */
        .loading-spinner {
            border: 3px solid rgba(255,255,0,0.3);
            border-top: 3px solid yellow;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            animation: spin 1s linear infinite;
            display: inline-block;
            margin-left: 10px;
            vertical-align: middle;
        }

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

        .loading-text {
            display: inline-block;
            vertical-align: middle;
        }
        
        /* Responsive Design */
        @media (max-width: 768px) {
            /* Aggressive text sizing like themes template */
            h1 { font-size: clamp(1.6rem, 4vw + 1rem, 2.1rem); }
            h2 { font-size: clamp(1.2rem, 2.8vw + .6rem, 1.6rem); }
            h3 { font-size: clamp(1.1rem, 2.5vw + .5rem, 1.4rem); }
            p, li { font-size: clamp(.86rem, 2.1vw + .28rem, .98rem); line-height: 1.55; }
            
            /* Specific mobile sizing for content sections */
            .content-section p,
            .story-section p,
            .paa-question p,
            .related-link {
                font-size: .8em !important;
                line-height: 1.6;
            }
            
            .content-container {
                padding: 15px;
            }
            
            .header {
                padding: 40px 15px 30px;
            }
            
            .header h1 {
                font-size: clamp(1.8rem, 5vw + 1rem, 2.2rem);
            }
            
            .header p {
                font-size: clamp(.9rem, 2.2vw + .3rem, 1.1rem);
            }
            
            .content-section {
                padding: 20px;
            }
            
            .content-section h2 {
                font-size: clamp(1.3rem, 3vw + .7rem, 1.5rem);
            }
            
            .chapter-navigator-container {
                flex-direction: column;
                gap: 10px;
            }
            
            .chapter-dropdown-btn {
                padding: 12px 20px;
                font-size: 1em;
                min-width: 180px;
            }
            
            .navigate-btn {
                padding: 12px 20px;
                font-size: 1em;
            }
            
            .toggle-btn {
                padding: 10px 18px;
                margin: 5px;
                font-size: 0.9em;
            }
        }
        
        @media (max-width: 480px) {
            .header h1 {
                font-size: 1.8em;
            }
            
            .chapter-navigator-section {
                padding: 20px;
            }
        }
        
        /* YouTube Carousel Styles - Exact copy from bible_chapter */
        .youtube-section {
            margin: 30px 0;
            padding: 20px;
            background: rgba(255, 0, 0, 0.08);
            backdrop-filter: blur(5px);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 0, 0.1);
        }
        
        .youtube-section h3 {
            color: #f1c40f;
            font-size: 1.4rem;
            margin-bottom: 15px;
            text-align: center;
        }
        
        .carousel-container {
            position: relative;
            max-width: 100%;
            overflow: hidden;
            padding: 0;
            margin: 0;
        }
        
        .video-carousel {
            display: flex;
            flex-wrap: nowrap;
            align-items: flex-start;
            gap: 15px;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 20px 36px;
            position: relative;
            scroll-behavior: smooth;
            scroll-snap-type: x mandatory;
            scroll-padding-left: 36px;
            scroll-padding-right: 36px;
            scrollbar-width: none;
            -ms-overflow-style: none;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            touch-action: pan-x;
        }
        
        .video-carousel::-webkit-scrollbar {
            display: none;
        }
        
        .carousel-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 0, 0, 0.2);
            color: yellow;
            border: 2px solid rgba(255, 255, 0, 0.4);
            box-shadow: 0 4px 8px rgba(0, 0, 0, .3);
            font-size: 1.5rem;
            padding: 15px 20px;
            border-radius: 50%;
            cursor: pointer;
            z-index: 10;
            transition: all 0.3s ease;
        }
        
        .carousel-arrow:hover {
            background: rgba(255, 0, 0, 0.3);
            border-color: rgba(255, 255, 0, 0.6);
            transform: translateY(-50%) scale(1.1);
        }
        
        .carousel-arrow.left {
            left: 8px;
        }
        
        .carousel-arrow.right {
            right: 8px;
        }
        
        .video-item {
            position: relative;
            flex: 0 0 auto;
            width: clamp(160px, 72vw, 220px);
            cursor: pointer;
            transition: transform 0.3s ease;
            scroll-snap-align: start;
        }
        
        .video-item:hover {
            transform: scale(1.05);
        }
        
        .video-thumbnail {
            width: 100%;
            height: auto;
            aspect-ratio: 16 / 9;
            object-fit: cover;
            border-radius: 8px;
            border: 2px solid rgba(255, 107, 107, 0.3);
        }
        
        .video-info {
            position: absolute;
            bottom: 8px;
            left: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 8px;
            border-radius: 4px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .verse-ref {
            font-size: 0.85rem;
            font-weight: bold;
        }
        
        .info-btn {
            background: rgba(255, 0, 0, 0.2);
            color: #f5f5dc;
            border: 2px solid rgba(255, 255, 0, 0.3);
            border-radius: 8px;
            padding: 4px 8px;
            text-decoration: none;
            cursor: pointer;
            transition: all .3s ease;
            display: inline-block;
            font-size: 0.8rem;
        }
        
        .info-btn:hover {
            background: rgba(255, 0, 0, 0.3);
            border-color: rgba(255, 255, 0, 0.6);
            transform: translateY(-2px);
            color: yellow;
        }
        
        .playlist-links {
            text-align: center;
            margin-top: 20px;
            padding: 25px;
            background: rgba(255, 0, 0, 0.08);
            border: 1px solid rgba(255, 255, 0, 0.1);
            border-radius: 15px;
        }
        
        .playlist-links h3 {
            color: #f1c40f;
            margin-bottom: 20px;
            font-size: 1.3rem;
        }
        
        .playlist-buttons {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 15px;
            max-width: 800px;
            margin: 0 auto;
        }
        
        .playlist-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 20px;
            background: rgba(255, 0, 0, 0.2);
            color: #f5f5dc;
            border: 2px solid rgba(255, 255, 0, 0.3);
            border-radius: 8px;
            text-decoration: none;
            cursor: pointer;
            transition: all .3s ease;
            font-size: 0.95rem;
            line-height: 1.3;
            text-align: center;
            white-space: normal;
            word-break: break-word;
            text-wrap: balance;
            min-width: 200px;
            min-height: 44px;
        }
        
        .playlist-link:hover {
            background: rgba(255, 0, 0, 0.3);
            border-color: rgba(255, 255, 0, 0.6);
            transform: translateY(-2px);
            color: yellow;
        }
        
        /* Related Content Footer Styles */
        .related-content-container {
            margin-top: 60px;
            padding: 40px;
            background: rgba(255, 0, 0, 0.08);
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 0, 0.1);
            border-radius: 15px;
        }
        
        .related-header {
            text-align: center;
            color: #f1c40f;
            font-size: 2rem;
            margin-bottom: 30px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }
        
        .related-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
            max-width: 1200px;
            margin: 0 auto;
        }
        
        .related-card {
            background: rgba(0, 0, 0, 0.6);
            border: 1px solid rgba(255, 0, 0, 0.3);
            border-radius: 10px;
            padding: 25px;
            transition: all 0.3s ease;
        }
        
        .related-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(255, 0, 0, 0.2);
            border-color: rgba(255, 0, 0, 0.5);
        }
        
        .related-card h3 {
            color: #8b4513;
            font-size: 1.2rem;
            margin-bottom: 15px;
            text-align: center;
            border-bottom: 2px solid rgba(255, 0, 0, 0.3);
            padding-bottom: 8px;
        }
        
        .related-link {
            display: block;
            color: #f5f5dc;
            text-decoration: none;
            padding: 10px 18px;
            margin: 8px 0;
            border-radius: 8px;
            background: rgba(255, 0, 0, 0.2);
            border: 2px solid rgba(255, 255, 0, 0.3);
            transition: all 0.3s ease;
            line-height: 1.4;
        }
        
        .related-link:hover {
            background: rgba(255, 0, 0, 0.3);
            border-color: rgba(255, 255, 0, 0.6);
            color: yellow;
            transform: translateY(-2px);
        }
        
        .similarity {
            font-size: 0.85rem;
            color: rgba(255, 0, 0, 0.7);
            float: right;
        }
        
        /* Mobile Responsive */
        @media (max-width: 768px) {
            .video-carousel {
                gap: 10px;
                padding: 16px 24px;
                scroll-padding-left: 24px;
                scroll-padding-right: 24px;
            }
            
            .carousel-arrow {
                display: none;
            }
            
            .related-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            
            .related-content-container {
                padding: 20px;
                margin-top: 40px;
            }
            
            .playlist-buttons {
                flex-direction: column;
                gap: 12px;
            }
            
            .playlist-link {
                display: block;
                margin: 0;
                min-width: auto;
                width: 100%;
                max-width: 320px;
            }
        }
        
        /* Video Info Modal Styles - Exact copy from bible_chapter */
        .video-info-modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
        }
        
        .video-info-modal.show {
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.3s ease;
        }
        
        .video-modal-content {
            background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
            border: 2px solid rgba(255, 107, 107, 0.3);
            border-radius: 15px;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow: hidden;
            position: relative;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
        }
        
        .video-modal-header {
            padding: 25px;
            border-bottom: 2px solid rgba(255, 107, 107, 0.3);
            position: relative;
        }
        
        .video-modal-close {
            position: absolute;
            top: 15px;
            right: 20px;
            background: none;
            border: none;
            font-size: 1.8rem;
            color: #ff6b6b;
            cursor: pointer;
            transition: transform 0.3s ease;
        }
        
        .video-modal-close:hover {
            transform: scale(1.2);
            color: white;
        }
        
        .video-modal-title {
            color: #f1c40f;
            font-size: 1.4rem;
            margin-bottom: 10px;
            line-height: 1.3;
        }
        
        .video-modal-verse {
            color: #b91c1c;
            font-size: 1.1rem;
            font-weight: bold;
        }
        
        .video-modal-body {
            padding: 25px;
            padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
            max-height: 60vh;
            overflow-y: auto;
        }
        
        /* Custom scrollbar for video modal */
        .video-modal-body::-webkit-scrollbar {
            width: 10px;
        }
        
        .video-modal-body::-webkit-scrollbar-track {
            background: rgba(185, 28, 28, 0.2);
            border-radius: 6px;
        }
        
        .video-modal-body::-webkit-scrollbar-thumb {
            background: rgba(241, 196, 15, 0.8);
            border-radius: 6px;
            border: 1px solid rgba(241, 196, 15, 0.4);
        }
        
        .video-modal-body::-webkit-scrollbar-thumb:hover {
            background: rgba(241, 196, 15, 1);
            border: 1px solid rgba(241, 196, 15, 0.6);
        }
        
        .video-modal-thumbnail {
            width: 100%;
            max-width: 300px;
            border-radius: 10px;
            margin-bottom: 20px;
            border: 2px solid rgba(255, 107, 107, 0.3);
        }
        
        .video-modal-description {
            color: #f0f0f0;
            line-height: 1.6;
            margin-bottom: 20px;
        }
        
        .video-modal-tags {
            margin-bottom: 20px;
        }
        
        .video-tag {
            display: inline-block;
            background: rgba(185, 28, 28, 0.3);
            color: #f1c40f;
            padding: 5px 10px;
            margin: 3px;
            border-radius: 15px;
            font-size: 0.85rem;
        }
        
        .video-modal-actions {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
        }
        
        .video-action-btn {
            background: rgba(255, 0, 0, 0.2);
            color: #f5f5dc;
            border: 2px solid rgba(255, 255, 0, 0.3);
            border-radius: 8px;
            padding: 10px 18px;
            text-decoration: none;
            cursor: pointer;
            transition: all .3s ease;
            display: inline-block;
            text-align: center;
            font-size: 1rem;
        }
        
        .video-action-btn.primary {
            color: yellow;
            border-color: yellow;
            box-shadow: 0 4px 15px rgba(255, 255, 0, 0.3);
            font-weight: 600;
        }
        
        .video-action-btn.primary:hover,
        .video-action-btn.secondary:hover {
            background: rgba(255, 0, 0, 0.3);
            border-color: rgba(255, 255, 0, 0.6);
            transform: translateY(-2px);
            color: yellow;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        
        @media (max-width: 380px){
            .video-modal-title { font-size: 1.15rem; }
            .video-modal-verse { font-size: .95rem; }
            .video-modal-description { font-size: .95rem; line-height: 1.5; }
            .video-action-btn { padding: 10px 12px; font-size: .95rem; }
            .video-modal-body { padding: 20px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 70px); }
        }
        
        /* YouTube Subscribe widget styling */
        .subscribe-label{
          display:block;
          margin-bottom:2px;
          color:#FFB300;
          font-weight:700;
          font-size:1.1em;
          text-shadow:2px 2px 4px rgba(0,0,0,.7);
        }
        
        .yt-subscribe--modal{
          display:flex;
          align-items:center;
          justify-content:flex-start;
          gap:10px;
          width:100%;
          margin:14px auto 18px;
          text-align:left;
        }
        
        .yt-subscribe--modal .g-ytsubscribe{
          display:inline-flex !important;
          align-items:center !important;
          justify-content:flex-start !important;
        }
        
        .yt-subscribe--modal .g-ytsubscribe > *{
          display:block !important;
          margin:0 !important;
        }
        
        @media (max-width:400px){
          .yt-subscribe--modal{
            flex-direction:row;
            align-items:center;
            max-width:100%;
            text-align:center;
          }
        }
        
        .video-modal-body{ overflow-x:hidden; }
        
        .btn-subscribe {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 12px 20px;
            background: rgba(255, 0, 0, 0.3);
            color: #f5f5dc;
            border: 2px solid rgba(255, 0, 0, 0.5);
            border-radius: 8px;
            text-decoration: none;
            cursor: pointer;
            transition: all .3s ease;
            font-size: 0.95rem;
            line-height: 1.3;
            text-align: center;
            min-width: 200px;
            min-height: 44px;
        }
        
        .btn-subscribe:hover {
            background: rgba(255, 0, 0, 0.5);
            border-color: rgba(255, 0, 0, 0.7);
            transform: translateY(-2px);
            color: white;
        }
        
        /* Hide the little arrows on overview headings */
        .overview-section h3:after,
        .overview-section h3::after {
          content: "" !important;
          display: none !important;
        }

        /* Optional: since the arrow is gone, no need to space-between */
        .overview-section h3 {
          justify-content: flex-start;
        }

/* Toggle Circle Navigation System */
.global-nav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    animation: slideInFromTopRight 0.5s ease;
}

/* Circle toggle button */
.nav-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-toggle-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

.nav-toggle-btn.active {
    background: rgba(255, 215, 0, 0.3);
    transform: rotate(180deg);
}

/* Hidden navigation panel */
.nav-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    padding: 15px;
    min-width: 200px;
    
    /* Hidden by default */
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-panel.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Navigation sections in panel */
.nav-section {
    position: relative;
    margin-bottom: 8px;
}

.nav-section:last-of-type {
    margin-bottom: 0;
}

.nav-main-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffd700;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: 'Isabella', Georgia, serif;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.2);
    cursor: pointer;
}

.nav-main-item:hover {
    background: rgba(255, 215, 0, 0.2);
    transform: translateX(-3px);
}

/* Submenu that appears on hover */
.nav-submenu {
    position: absolute;
    right: 100%;
    top: 0;
    margin-right: -2px; /* Overlap to prevent hover gap */
    background: rgba(255, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    padding: 10px;
    min-width: 150px;
    z-index: 60;
    
    /* Hidden by default */
    opacity: 0;
    transform: translateX(6px);
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
}

/* Show submenu when section OR submenu is hovered */
.nav-section:hover .nav-submenu,
.nav-section:focus-within .nav-submenu,
.nav-submenu:hover {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.nav-submenu a {
    display: block;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    color: #f0f0f0;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-family: 'Isabella', Georgia, serif;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.1);
}

.nav-submenu a:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    transform: translateX(-2px);
}

/* Divider */
.nav-divider {
    height: 1px;
    background: rgba(255, 215, 0, 0.3);
    margin: 10px 0;
}

/* Contextual navigation in panel */
.nav-contextual {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.4);
    color: #ccc;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-family: 'Isabella', Georgia, serif;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 215, 0, 0.1);
    display: flex;
    align-items: center;
}

.nav-contextual:hover {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

.nav-contextual .arrow {
    margin-right: 8px;
    font-size: 1rem;
}

/* Keep nav above all */
.global-nav {
    z-index: 2000;
}

/* Mobile: replicate desktop floating panel & left-flyout */
@media (max-width: 768px) {
    /* Button stays at corner */
    .global-nav {
        top: 12px;
        right: 12px;
    }
    
    /* Floating panel anchored to top-right; no full-screen */
    .nav-panel {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 52px);
        right: 12px;
        left: auto;
        bottom: auto;
        
        width: 260px; /* compact menu width */
        max-height: 75vh; /* scroll panel if tall */
        overflow-y: auto;
        overflow-x: visible; /* let flyouts render beyond panel */
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        
        margin: 0;
        padding: 12px;
        border-radius: 14px;
        background: rgba(26, 0, 0, 0.92);
        border: 1px solid rgba(255, 215, 0, 0.28);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
        
        display: none;
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 0.18s ease, transform 0.18s ease;
        z-index: 2001;
    }
    
    .nav-panel.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Each section is a positioning context for its flyout */
    .nav-section {
        position: relative;
    }
    
    .nav-main-item {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    /* IMPORTANT: keep absolute left flyout like desktop */
    .nav-submenu {
        position: absolute;
        top: 0;
        right: calc(100% - 6px); /* overlap a bit to avoid a gap */
        min-width: 160px;
        
        background: rgba(255, 0, 0, 0.1);
        backdrop-filter: blur(15px);
        border-radius: 10px;
        border: 1px solid rgba(255, 215, 0, 0.3);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
        padding: 10px;
        z-index: 60;
        
        opacity: 0;
        transform: translateX(6px);
        pointer-events: none;
        transition: opacity 0.12s ease, transform 0.12s ease;
    }
    
    /* Open state driven by a class (tap to toggle) */
    .nav-section.open .nav-submenu {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
    
    /* Disable hover logic on touch—use the .open class instead */
    .nav-section:hover .nav-submenu {
        opacity: 0;
        pointer-events: none;
    }
    
    .nav-submenu a {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .nav-contextual {
        margin-top: 8px;
        padding: 12px 14px;
        font-size: 0.98rem;
    }
    
    .nav-toggle-btn.active {
        transform: rotate(180deg);
    }
}

/* Optional safety fallback for ultra-narrow phones */
@media (max-width: 360px) {
    .nav-panel {
        right: 8px;
        width: 88vw;
    }
}

/* --- Mobile: accordion instead of left flyout --- */
@media (max-width: 768px) {
    /* keep the panel fixed height and scrollable */
    .nav-panel {
        width: clamp(220px, 90vw, 320px);
        max-height: 75vh; /* panel doesn't grow; it scrolls */
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* rows a bit tighter (optional) */
    .nav-main-item {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    /* turn the flyout into a downward dropdown */
    .nav-submenu {
        position: static !important; /* no absolute flyout */
        right: auto;
        top: auto;
        left: auto;
        width: 100%;
        min-width: 0;
        max-width: none;
        
        margin-top: 6px;
        border-radius: 10px;
        border: 1px solid rgba(255, 215, 0, 0.3);
        background: rgba(255, 0, 0, 0.08);
        
        /* accordion mechanics */
        overflow: hidden; /* hide when collapsed */
        max-height: 0; /* collapsed */
        padding: 0; /* collapsed */
        opacity: 1 !important; /* ditch hover fade logic */
        transform: none !important;
        pointer-events: auto !important;
        
        transition: max-height 0.24s ease, padding 0.18s ease;
        will-change: max-height;
    }
    
    /* opened state */
    .nav-section.open .nav-submenu {
        /* max-height set inline via JS to the real content height */
        padding: 8px;
    }
    
    /* smaller submenu links */
    .nav-submenu a {
        padding: 8px 10px;
        font-size: 0.92rem;
    }
    
    /* caret rotate on open */
    .nav-main-item span {
        transition: transform 0.18s ease;
    }
    
    .nav-section.open .nav-main-item span {
        transform: rotate(90deg);
    }
    
    /* neutralize the desktop hover rule on phones */
    .nav-section:hover .nav-submenu {
        max-height: 0;
        padding: 0;
    }
}

@keyframes slideInFromTopRight {
    from {
        opacity: 0;
        transform: translate(30px, -30px);
    }
    to {
        opacity: 1;
        transform: translate(0, 0);
    }
}

/* Related Link Overlay Loading */
.related-link-container.loading {
    padding: 0;  /* Override generic .loading padding */
    text-align: inherit;
    color: inherit;
    font-style: inherit;
}

.related-link-container.loading .related-link {
    position: relative;
}

.related-link-container.loading .related-link::after {
    content: "Loading...";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 0, 0, 0.3);
    color: yellow;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 8px;
    z-index: 10;
    font-size: 0.95rem;
    backdrop-filter: blur(2px);
}

/* Legal Footer Styles */
.legal-footer {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 0;
    font-family: Georgia, serif;
    margin-top: 40px;
    position: relative;
    z-index: 100;
}

.legal-footer-content {
    text-align: center;
    font-size: 0.8em;
    color: #f0f0f0;
}

.legal-links a {
    color: #ff6666;
    text-decoration: none;
    font-weight: normal;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
}

.legal-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.legal-links .divider {
    color: #ff6666;
    margin: 0 8px;
    opacity: 0.5;
}

        /* Global body scrollbar - matching modal pattern */
        ::-webkit-scrollbar {
            width: 10px;
        }
        
        ::-webkit-scrollbar-track {
            background: rgba(185, 28, 28, 0.2);
            border-radius: 6px;
        }
        
        ::-webkit-scrollbar-thumb {
            background: rgba(241, 196, 15, 0.8);
            border-radius: 6px;
            border: 1px solid rgba(241, 196, 15, 0.4);
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(241, 196, 15, 1);
            border: 1px solid rgba(241, 196, 15, 0.6);
        }
