/* Isabella Font Declaration - matching live site */
        @font-face {
            font-family: 'Isabella';
            src: url('../../../assets/fonts/Isabella.ttf') format('truetype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }
        
        /* Base Reset */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Isabella', Georgia, serif;
            line-height: 1.7;
            color: #f0f0f0;
            background: #000;
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
        }
        
        /* Parallax Background Container - Matching live site exactly */
        #parallax-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background-color: black;
        }
        
        .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 ease-in-out;
        }
        
        #parallax-bg-a {
            z-index: 2;
            opacity: 0.3;
            /* Background image will be set via JavaScript */
        }
        
        #parallax-bg-b {
            z-index: 1;
            opacity: 0;
            /* Background image will be set via JavaScript */
        }
        
        /* 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: 'Isabella', 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);
        }
        
        /* KJV Reader Section - Red tinted glass */
        .kjv-reader-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);
        }
        
        .kjv-reader-section p {
            color: #f5f5dc;
            margin: 10px 0 20px 0;
            font-size: 1.1em;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }
        
        .kjv-btn {
            background: rgba(255, 0, 0, 0.2);
            color: yellow;
            border: 2px solid rgba(255, 255, 0, 0.4);
            padding: 15px 35px;
            font-size: 1.1em;
            font-weight: 600;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
            font-family: 'Isabella', Georgia, serif;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
            letter-spacing: 1px;
        }
        
        .kjv-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);
        }
        
        .kjv-btn:active {
            transform: translateY(0);
        }
        
        /* 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: 'Isabella', 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: 'Isabella', 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);
        }
        
        .content-section ul, .content-section ol {
            color: #f5f5dc;
            margin: 15px 0;
            padding-left: 25px;
        }
        
        .content-section li {
            margin-bottom: 8px;
            line-height: 1.7;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }
        
        /* Quick Insights styling */
        .quick-insights ul {
            background: rgba(255, 0, 0, 0.08);
            padding: 20px;
            border-left: 4px solid yellow;
            border-radius: 8px;
            backdrop-filter: blur(5px);
        }
        
        .quick-insights li {
            margin-bottom: 10px;
        }
        
        /* 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;
        }
        
        /* Modal Styles - Enhanced with red tinting */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            background-color: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
        }
        
        .modal-content {
            background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(255, 0, 0, 0.15));
            backdrop-filter: blur(10px);
            margin: 2% auto;
            padding: 0;
            border: 2px solid rgba(255, 255, 0, 0.3);
            width: 90%;
            max-width: 900px;
            max-height: 90vh;
            border-radius: 15px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            overflow: hidden;
        }
        
        .modal-header {
            background: rgba(255, 0, 0, 0.3);
            backdrop-filter: blur(5px);
            color: yellow;
            padding: 20px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2px solid rgba(255, 255, 0, 0.3);
        }
        
        .modal-header h2 {
            margin: 0;
            font-size: 1.8em;
            font-family: 'Isabella', Georgia, serif;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
        }
        
        .chapter-ref {
            font-size: 0.9em;
            opacity: 0.9;
            font-weight: normal;
        }
        
        .modal-body {
            padding: 30px;
            max-height: calc(90vh - 80px - 60px);
            overflow-y: auto;
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(5px);
        }
        
        .bible-verse {
            margin-bottom: 15px;
            padding: 10px;
            background: rgba(255, 0, 0, 0.05);
            border-left: 3px solid rgba(255, 255, 0, 0.3);
            transition: all 0.3s ease;
            border-radius: 5px;
            backdrop-filter: blur(5px);
        }
        
        .bible-verse:hover {
            background: rgba(255, 0, 0, 0.1);
            border-left-color: yellow;
        }
        
        .verse-number {
            font-weight: bold;
            color: yellow;
            font-size: 0.9em;
            vertical-align: super;
            margin-right: 4px;
        }
        
        .verse-text {
            color: #f5f5dc;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
        }
        
        /* Scrollbar Styling */
        .modal-body::-webkit-scrollbar {
            width: 10px;
        }
        
        .modal-body::-webkit-scrollbar-track {
            background: rgba(185, 28, 28, 0.2);
            border-radius: 6px;
        }
        
        .modal-body::-webkit-scrollbar-thumb {
            background: rgba(241, 196, 15, 0.8);
            border-radius: 6px;
            border: 1px solid rgba(241, 196, 15, 0.4);
        }
        
        .modal-body::-webkit-scrollbar-thumb:hover {
            background: rgba(241, 196, 15, 1);
            border: 1px solid rgba(241, 196, 15, 0.6);
        }
        
        /* Loading state */
        .loading {
            text-align: center;
            padding: 40px;
            color: #f5f5dc;
            font-style: italic;
        }
        
        .close {
            color: yellow;
            font-size: 32px;
            font-weight: bold;
            cursor: pointer;
            line-height: 20px;
            transition: all 0.3s ease;
        }
        
        .close:hover,
        .close:focus {
            transform: scale(1.2);
            text-decoration: none;
            color: #ffd700;
        }
        
        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,255,0.3);
            border-top: 3px solid #ffd700;
            border-radius: 50%;
            width: 16px;
            height: 16px;
            animation: loading-spin 1s linear infinite;
            display: inline-block;
            margin-left: 8px;
            vertical-align: middle;
            background: transparent;
            box-sizing: border-box;
        }

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

        .loading-text {
            display: inline-block;
            vertical-align: middle;
        }

        /* 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);
        }
        
        /* 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,
            .modal-body 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);
            }
            
            .kjv-btn {
                padding: 12px 25px;
                font-size: 1em;
            }
            
            .modal-content {
                width: 95%;
                margin: 5% auto;
            }
            
            .modal-body {
                padding: 20px;
            }
            
            .toggle-btn {
                padding: 10px 18px;
                margin: 5px;
                font-size: 0.9em;
            }
        }
        
        @media (max-width: 480px) {
            .header h1 {
                font-size: 1.8em;
            }
            
            .kjv-reader-section {
                padding: 20px;
            }
        }
        
        /* YouTube Carousel Styles */
        .youtube-section {
            margin: 30px 0;
            padding: 20px;
            background: rgba(255, 0, 0, 0.08);       /* same as .view-toggle */
            backdrop-filter: blur(5px);
            border-radius: 15px;
            border: 1px solid rgba(255, 255, 0, 0.1); /* match top border */
        }
        
        .youtube-section h3 {
            color: #f1c40f;
            font-size: 1.4rem;
            margin-bottom: 15px;
            text-align: center;
        }
        
        .carousel-container {
            position: relative;
            max-width: 100%;
            overflow: hidden;        /* keep arrows, but clip the track edges */
            padding: 0;              /* move padding to track */
            margin: 0;               /* avoid extra cut-off near page edge */
        }
        
        .video-carousel {
            display: flex;
            flex-wrap: nowrap;       /* keep items on one line, always */
            align-items: flex-start;  /* avoids odd stretching */
            gap: 15px;
            overflow-x: auto;
            overflow-y: hidden;
            padding: 20px 36px;      /* move side padding onto the track */
            position: relative;
            scroll-behavior: smooth;
            scroll-snap-type: x mandatory;
            scroll-padding-left: 36px;   /* tell scroll-snap there is side padding */
            scroll-padding-right: 36px;
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE/Edge */
            /* Mobile-friendly carousel hardening */
            -webkit-overflow-scrolling: touch;   /* iOS momentum scrolling */
            overscroll-behavior-x: contain;      /* stop horizontal scroll chaining */
            touch-action: pan-x;                  /* allow horizontal swipes */
        }
        
        .video-carousel::-webkit-scrollbar {
            display: none; /* Chrome/Safari */
        }
        
        .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;         /* fixed card width instead of flex-basis */
            width: clamp(160px, 72vw, 220px);     /* responsive width that scales nicely */
            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;  /* Keep thumbnails crisp and stable heights */
            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;           /* allow wrapping */
            word-break: break-word;
            text-wrap: balance;
            min-width: 200px;
            min-height: 44px;              /* thumb-friendly */
        }
        
        .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 {                     /* swipe > arrows on phones */
                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;
            }
            
            .carousel-arrow {
                padding: 10px 15px;
                font-size: 1.2rem;
            }
        }
        
        /* Video Info Modal Styles */
        .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); /* ensure buttons aren't cut off */
            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;
        }
        
        .video-action-btn.secondary {
            /* Uses base styles from .video-action-btn */
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        /* iPhone SE polish breakpoint */
        @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 — single source of truth === */
        .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);
        }


        /* MODAL: left-aligned (flex-start) on one row */
        .yt-subscribe--modal{
          display:flex;
          align-items:center;
          justify-content:flex-start;   /* left align */
          gap:10px;
          width:100%;
          /*max-width:480px;*/
          margin:14px auto 18px;
          text-align:left;
        }
        /* Keep Google's widget from recentring itself */
        .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;          /* no auto-centering in modal */
        }

        /* Safety on ultra-narrow phones (iPhone SE, ≤400px) */
        @media (max-width:400px){
          .yt-subscribe--modal{
            flex-direction:row;       /* stack: label above button */
            align-items:center;
            max-width:100%;
            text-align:center;
          }
        }

        /* Prevent horizontal clipping inside the modal body */
        .video-modal-body{ overflow-x:hidden; }


        /* Simple subscribe button styling */
        .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;
        }

        /* Verse Range Navigation Styles */
        .verse-range-navigator-section {
            background: rgba(185, 28, 28, 0.1);
            border: 2px solid rgba(185, 28, 28, 0.3);
            border-radius: 12px;
            padding: 30px;
            margin: 30px 0;
            text-align: center;
        }

        .verse-range-navigator-section h3 {
            color: #f1c40f;
            margin-bottom: 20px;
            font-size: 1.4rem;
        }

        .verse-range-navigator-container {
            display: flex;
            gap: 15px;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
        }

        .verse-range-dropdown {
            position: relative;
            display: inline-block;
        }

        .verse-range-dropdown-btn {
            background: rgba(185, 28, 28, 0.8);
            color: #f5f5dc;
            padding: 12px 20px;
            font-size: 1rem;
            border: 2px solid rgba(185, 28, 28, 0.6);
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 200px;
            transition: all 0.3s ease;
        }

        .verse-range-dropdown-btn:hover {
            background: rgba(185, 28, 28, 1);
            border-color: #f1c40f;
            transform: translateY(-2px);
        }

        .verse-range-dropdown-btn .btn-label {
            flex: 1;
        }

        .verse-range-dropdown-btn .caret {
            transition: transform 0.3s ease;
        }

        .verse-range-dropdown-btn[aria-expanded="true"] .caret {
            transform: rotate(180deg);
        }

        .verse-range-dropdown-content {
            display: none;
            position: absolute;
            background: rgba(30, 30, 30, 0.95);
            min-width: 300px;
            max-height: 300px;
            border: 2px solid rgba(185, 28, 28, 0.6);
            border-radius: 8px;
            z-index: 1000;
            top: 100%;
            left: 0;
            margin-top: 5px;
            overflow: hidden;
        }

        .verse-range-dropdown-content.show {
            display: block;
        }

        .verse-range-search {
            width: 100%;
            padding: 12px;
            border: none;
            border-bottom: 2px solid rgba(185, 28, 28, 0.3);
            background: rgba(30, 30, 30, 0.9);
            color: #f5f5dc;
            font-size: 1rem;
            outline: none;
        }

        .verse-range-search::placeholder {
            color: rgba(245, 245, 220, 0.6);
        }

        .verse-range-search:focus {
            border-bottom-color: #f1c40f;
        }

        .verse-range-list {
            max-height: 240px;
            overflow-y: auto;
            padding: 5px 0;
        }

        .verse-range-item {
            display: block;
            padding: 12px 15px;
            color: #f5f5dc;
            text-decoration: none;
            cursor: pointer;
            transition: background-color 0.3s ease;
            border-bottom: 1px solid rgba(185, 28, 28, 0.2);
        }

        .verse-range-item:hover {
            background: rgba(185, 28, 28, 0.3);
            color: #f1c40f;
        }

        .verse-range-item:last-child {
            border-bottom: none;
        }

        .navigate-btn {
            background: rgba(241, 196, 15, 0.8);
            color: #1a1a1a;
            padding: 12px 20px;
            font-size: 1rem;
            border: 2px solid rgba(241, 196, 15, 0.6);
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.3s ease;
            min-width: 120px;
        }

        .navigate-btn:hover:not(:disabled) {
            background: rgba(241, 196, 15, 1);
            border-color: #f1c40f;
            transform: translateY(-2px);
        }

        .navigate-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .no-verse-ranges {
            padding: 20px;
            color: rgba(245, 245, 220, 0.7);
            text-align: center;
            font-style: italic;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .verse-range-navigator-container {
                flex-direction: column;
                align-items: stretch;
            }

            .verse-range-dropdown-btn,
            .navigate-btn {
                width: 100%;
                justify-content: center;
            }

            .verse-range-dropdown-content {
                min-width: 100%;
            }
        }

        /* 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);
            }
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideRight {
            from {
                opacity: 0;
                transform: translateX(-10px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

/* 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);
        }