:root {
            --primary-red: #dc2626;
            --primary-hover: #b91c1c;
            --dark-red: #991b1b;
            --light-red: #fef2f2;
            --accent-red: #ff4d4d;
            --border-red: #fecaca;
            --dark-bg: #0f172a;
            --card-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
        }

        body {
            font-family: 'Plus Jakarta Sans', sans-serif;
            background-color: #f8fafc;
            color: #334155;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }

        /* Header Navbar */
        .navbar-brand {
            font-weight: 800;
            font-size: 1.5rem;
            color: var(--primary-red) !important;
            letter-spacing: -0.5px;
        }

        .nav-link {
            font-weight: 600;
            color: #475569 !important;
            padding: 0.45rem 0.55rem !important;
            border-radius: 8px;
            font-size: 0.86rem;
            white-space: nowrap;
            transition: all 0.2s ease;
        }

        .nav-link:hover,
        .nav-link.active {
            color: var(--primary-red) !important;
            background-color: var(--light-red);
        }

        @media (min-width: 1400px) {
            .nav-link {
                padding: 0.5rem 0.75rem !important;
                font-size: 0.9rem;
            }
        }

        .btn-red {
            background-color: var(--primary-red);
            color: #ffffff;
            font-weight: 600;
            border: none;
            border-radius: 10px;
            padding: 0.65rem 1.4rem;
            transition: all 0.25s ease;
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
        }

        .btn-red:hover {
            background-color: var(--primary-hover);
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35);
        }

        .btn-outline-red {
            border: 2px solid var(--primary-red);
            color: var(--primary-red);
            font-weight: 600;
            border-radius: 10px;
            padding: 0.6rem 1.2rem;
            transition: all 0.25s ease;
            background: transparent;
        }

        .btn-outline-red:hover {
            background-color: var(--primary-red);
            color: #ffffff;
        }

        /* Hero Banner */
        .hero-banner {
            background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
            border-bottom: 1px solid var(--border-red);
            padding: 2.5rem 0 1.5rem 0;
        }

        .badge-red {
            background-color: var(--light-red);
            color: var(--primary-red);
            border: 1px solid var(--border-red);
            font-weight: 700;
            padding: 0.4rem 1rem;
            border-radius: 50px;
            font-size: 0.85rem;
            display: inline-block;
        }

        /* Drag & Drop Zone */
        .dropzone-box {
            border: 2px dashed #fca5a5;
            background-color: #ffffff;
            border-radius: 16px;
            padding: 2.5rem 1.5rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .dropzone-box:hover,
        .dropzone-box.dragover {
            border-color: var(--primary-red);
            background-color: var(--light-red);
            transform: scale(1.005);
        }

        .dropzone-icon {
            width: 65px;
            height: 65px;
            background-color: var(--light-red);
            color: var(--primary-red);
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1.75rem;
            margin-bottom: 1rem;
        }

        /* Feature Cards */
        .feature-card {
            background: #ffffff;
            border: 1px solid #fee2e2;
            border-radius: 16px;
            padding: 1.75rem;
            height: 100%;
            transition: all 0.3s ease;
            box-shadow: var(--card-shadow);
        }

        .feature-card:hover {
            transform: translateY(-4px);
            border-color: var(--primary-red);
            box-shadow: 0 15px 30px -5px rgba(220, 38, 38, 0.15);
        }

        .feature-icon-wrapper {
            width: 55px;
            height: 55px;
            border-radius: 14px;
            background-color: var(--light-red);
            color: var(--primary-red);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            margin-bottom: 1.25rem;
        }

        /* Recording Pulse Effect */
        .recording-pulse {
            width: 14px;
            height: 14px;
            background-color: var(--primary-red);
            border-radius: 50%;
            display: inline-block;
            animation: pulse-animation 1.5s infinite;
        }

        @keyframes pulse-animation {
            0% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
            }

            70% {
                transform: scale(1.1);
                box-shadow: 0 0 0 12px rgba(220, 38, 38, 0);
            }

            100% {
                transform: scale(0.95);
                box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
            }
        }

        /* Output Transcript Box */
        .transcript-output-card {
            border-radius: 16px;
            border: 1px solid var(--border-red);
            background: #ffffff;
            box-shadow: var(--card-shadow);
            overflow: hidden;
        }

        .transcript-header {
            background-color: var(--light-red);
            padding: 1rem 1.5rem;
            border-bottom: 1px solid var(--border-red);
        }

        .transcript-body {
            max-height: 480px;
            overflow-y: auto;
            padding: 1.25rem;
            font-size: 0.95rem;
            line-height: 1.6;
            white-space: normal;
            background-color: #fafafa;
        }

        .video-transcript-segment {
            background: #ffffff;
            border: 1px solid #f1f5f9;
            transition: all 0.2s ease;
        }

        .video-transcript-segment:hover {
            background-color: #fff5f5;
            border-color: #fecaca;
        }

        .video-word {
            display: inline-block;
            padding: 1px 2px;
            border-radius: 3px;
            transition: all 0.15s ease;
        }

        /* Karaoke / Spoken Word Highlighting */
        .yt-word {
            display: inline-block;
            transition: all 0.15s ease;
            padding: 1px 3px;
            border-radius: 4px;
        }

        .yt-word.word-active {
            background-color: #fef08a !important; /* Vivid soft yellow highlight */
            color: #b91c1c !important; /* Bold primary red */
            font-weight: 700 !important;
            transform: scale(1.06);
            box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
        }

        .yt-word.word-played {
            color: #1e293b;
        }



        .social-preview-card {
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            background: #ffffff;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .social-preview-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
        }

        .pill-badge {
            display: inline-flex;
            align-items: center;
            padding: 0.35rem 0.75rem;
            border-radius: 50rem;
            font-size: 0.75rem;
            font-weight: 700;
            letter-spacing: 0.3px;
        }

        .pill-badge-red {
            background-color: var(--light-red);
            color: var(--primary-red);
            border: 1px solid var(--border-red);
        }

        /* Footer */
        footer {
            background-color: var(--dark-bg);
            color: #cbd5e1;
            margin-top: auto;
        }

        footer p,
        footer .footer-desc {
            color: #94a3b8 !important;
            font-size: 0.95rem;
            line-height: 1.6;
        }

        footer h6 {
            color: #ffffff;
            font-weight: 700;
            margin-bottom: 1.2rem;
        }

        footer a {
            color: #cbd5e1;
            text-decoration: none;
            transition: color 0.2s ease;
        }

        footer a:hover {
            color: var(--accent-red);
        }

        .footer-bottom {
            border-top: 1px solid #1e293b;
            padding-top: 1.5rem;
            margin-top: 2rem;
            color: #94a3b8;
        }

        /* Steps Circle UI */
        .step-circle {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background-color: var(--primary-red);
            color: white;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 0.75rem;
        }

        /* Accordion Styling */
        .accordion-button:not(.collapsed) {
            color: var(--dark-red);
            background-color: var(--light-red);
            box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
        }

        .accordion-button:focus {
            box-shadow: 0 0 0 0.25rem rgba(220, 38, 38, 0.25);
            border-color: var(--border-red);
        }

        /* Format Pills */
        .format-badge {
            background-color: #f1f5f9;
            color: #475569;
            font-size: 0.75rem;
            font-weight: 600;
            padding: 0.25rem 0.6rem;
            border-radius: 6px;
            margin-right: 0.3rem;
            margin-bottom: 0.3rem;
            display: inline-block;
        }

        /* Platform Badges & Cards for Downloader */
        .platform-chip {
            background-color: #ffffff;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 0.6rem 0.9rem;
            display: inline-flex;
            align-items: center;
            gap: 0.55rem;
            font-size: 0.86rem;
            font-weight: 600;
            color: #1e293b;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
            transition: all 0.25s ease;
            text-decoration: none;
            cursor: pointer;
        }

        .platform-chip:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
            border-color: #cbd5e1;
        }

        .platform-icon {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            color: #ffffff;
        }

        /* Single Page Application Router Views */
        .spa-view {
            display: none;
        }

        .spa-view.active-view {
            display: block;
            animation: fadeIn 0.25s ease-in-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Custom Alert Toast */
        #customAlert {
            position: fixed;
            bottom: 25px;
            right: 25px;
            z-index: 9999;
            display: none;
            max-width: min(380px, calc(100vw - 30px));
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
        }

        /* Responsive Improvements & Touch-friendly UX */
        html {
            scroll-behavior: smooth;
        }

        /* Prevent Horizontal Scrolling on any device */
        body {
            overflow-x: hidden;
            width: 100%;
        }

        /* Responsive Hero Elements */
        @media (max-width: 576px) {
            .hero-banner h1.display-5 {
                font-size: 1.85rem;
                line-height: 1.25;
            }

            .hero-banner p.lead {
                font-size: 0.98rem;
            }

            .hero-banner {
                padding: 1.75rem 0 1rem 0;
            }

            .dropzone-box {
                padding: 1.75rem 1rem;
            }

            .dropzone-icon {
                width: 52px;
                height: 52px;
                font-size: 1.4rem;
            }

            .card {
                padding: 1.25rem !important;
            }

            .transcript-header {
                padding: 0.85rem 1rem;
            }

            .transcript-body {
                padding: 1rem;
                font-size: 0.92rem;
                max-height: 320px;
            }

            #customAlert {
                left: 15px;
                right: 15px;
                bottom: 15px;
                width: auto;
            }
        }

        /* Responsive Input Group on Mobile */
        @media (max-width: 767.98px) {
            .responsive-input-group {
                flex-direction: column;
                gap: 8px;
            }

            .responsive-input-group>.input-group-text,
            .responsive-input-group>.form-control,
            .responsive-input-group>.btn {
                border-radius: 10px !important;
                width: 100%;
            }

            .responsive-input-group>.input-group-text {
                display: none;
            }

            .navbar-nav {
                padding: 0.75rem 0;
            }

            .navbar-nav .nav-link {
                padding: 0.65rem 1rem !important;
                font-size: 1rem;
            }
        }

        /* Smooth UI Buttons & Focus Rings */
        .btn:focus,
        .form-control:focus,
        .form-select:focus {
            box-shadow: 0 0 0 0.25rem rgba(220, 38, 38, 0.2);
            border-color: #fca5a5;
        }

        /* Audio Player Responsive */
        audio {
            max-width: 100%;
            border-radius: 30px;
        }

        /* Code and Pre formatting on small screens */
        pre,
        code {
            word-break: break-all;
            white-space: pre-wrap;
        }

        /* Fixed aspect-ratios to eliminate layout shifts (CLS) on media containers */
        video,
        iframe {
            aspect-ratio: 16 / 9;
            width: 100%;
        }

        /* Table and grid safety */
        img,
        svg {
            max-width: 100%;
            height: auto;
        }
        /* Critical Hero Viewport Height for Layout Stability (Eliminates CLS) */
        .hero-section {
            min-height: 480px;
        }
