@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

        #ytv-widget-wrapper * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        #ytv-widget-wrapper {
            /* Renamed and scoped CSS Variables */
            --ytv-primary-color: #e91e63;
            --ytv-primary-dark: #c2185b;
            --ytv-primary-light: #f06292;
            --ytv-secondary-color: #9c27b0;
            --ytv-accent-color: #ff5722;
            --ytv-success-gradient: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
            --ytv-purple-gradient: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
            --ytv-orange-gradient: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
            --ytv-blue-gradient: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
            --ytv-glass-bg: rgba(255, 255, 255, 0.1);
            --ytv-glass-border: rgba(255, 255, 255, 0.15);
            --ytv-text-primary: #1a1a1a;
            --ytv-text-secondary: #666666;
            --ytv-text-light: #999999;
            --ytv-surface: rgba(255, 255, 255, 0.95);
            --ytv-surface-hover: rgba(255, 255, 255, 1);
            --ytv-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
            --ytv-shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
            --ytv-shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
            --ytv-shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.18);
            --ytv-shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.25);

            /* Scoped Body Styles */
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #8B7ED8 0%, #B794F6 50%, #D6BCFA 100%);
            min-height: 100vh;
            line-height: 1.6;
            position: relative;
            overflow-x: hidden;
        }

        #ytv-widget-wrapper::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background:
                radial-gradient(circle at 20% 30%, rgba(139, 126, 216, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(183, 148, 246, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(214, 188, 250, 0.2) 0%, transparent 50%);
            pointer-events: none;
            z-index: -1;
        }

        #ytv-widget-wrapper .ytv-container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            z-index: 1;
        }

        #ytv-widget-wrapper .ytv-header {
            text-align: center;
            margin-bottom: 50px;
            padding: 40px 0;
            animation: ytv-fadeInDown 1s ease-out;
        }

        @keyframes ytv-fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes ytv-fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes ytv-slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-50px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @keyframes ytv-pulse {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.05);
            }
        }

        #ytv-widget-wrapper .ytv-logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 20px;
            margin-bottom: 25px;
        }

        #ytv-widget-wrapper .ytv-logo-icon {
            width: 80px;
            height: 80px;
            background: var(--ytv-success-gradient);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 36px;
            font-weight: 900;
            box-shadow: var(--ytv-shadow-2xl);
            position: relative;
            overflow: hidden;
            animation: ytv-pulse 2s ease-in-out infinite;
        }

        #ytv-widget-wrapper .ytv-logo-icon::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
            transform: rotate(45deg);
            animation: ytv-shine 3s infinite;
        }

        @keyframes ytv-shine {
            0% {
                transform: translateX(-100%) translateY(-100%) rotate(45deg);
            }

            50% {
                transform: translateX(100%) translateY(100%) rotate(45deg);
            }

            100% {
                transform: translateX(-100%) translateY(-100%) rotate(45deg);
            }
        }

        #ytv-widget-wrapper .ytv-logo-text-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        #ytv-widget-wrapper .ytv-youtube-logo-icon {
            width: 50px;
            height: 50px;
            background: #ff0000;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            animation: ytv-youtubeFloat 3s ease-in-out infinite;
            box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
        }

        #ytv-widget-wrapper .ytv-logo-text {
            font-size: 48px;
            font-weight: 900;
            background: linear-gradient(135deg, #ffffff, #f0f0f0, #ffffff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            letter-spacing: -1px;
        }

        #ytv-widget-wrapper .ytv-camera-logo-icon {
            width: 50px;
            height: 50px;
            background: var(--ytv-primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 24px;
            animation: ytv-cameraBounce 2s ease-in-out infinite;
            box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
        }

        @keyframes ytv-youtubeFloat {

            0%,
            100% {
                transform: translateY(0px) scale(1);
            }

            50% {
                transform: translateY(-8px) scale(1.05);
            }
        }

        @keyframes ytv-cameraBounce {

            0%,
            100% {
                transform: translateY(0px) rotate(0deg);
            }

            25% {
                transform: translateY(-5px) rotate(-5deg);
            }

            75% {
                transform: translateY(-5px) rotate(5deg);
            }
        }

        #ytv-widget-wrapper .ytv-subtitle {
            color: rgba(255, 255, 255, 0.95);
            font-size: 20px;
            font-weight: 500;
            margin-bottom: 30px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }

        #ytv-widget-wrapper .ytv-features-bar {
            display: flex;
            justify-content: center;
            gap: 25px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }

        #ytv-widget-wrapper .ytv-feature-item {
            display: flex;
            align-items: center;
            gap: 12px;
            color: rgba(255, 255, 255, 0.95);
            font-size: 15px;
            font-weight: 600;
            background: var(--ytv-glass-bg);
            backdrop-filter: blur(20px);
            padding: 14px 22px;
            border-radius: 30px;
            border: 1px solid var(--ytv-glass-border);
            transition: all 0.3s ease;
        }

        #ytv-widget-wrapper .ytv-feature-item:hover {
            transform: translateY(-3px);
            box-shadow: var(--ytv-shadow-lg);
            background: rgba(255, 255, 255, 0.25);
        }

        #ytv-widget-wrapper .ytv-feature-icon {
            width: 26px;
            height: 26px;
            background: var(--ytv-success-gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: white;
            font-weight: 700;
        }

        #ytv-widget-wrapper .ytv-input-section {
            background: var(--ytv-glass-bg);
            backdrop-filter: blur(30px);
            border: 1px solid var(--ytv-glass-border);
            padding: 40px;
            border-radius: 30px;
            box-shadow: var(--ytv-shadow-2xl);
            margin-bottom: 40px;
            animation: ytv-fadeInUp 1s ease-out 0.2s both;
        }

        #ytv-widget-wrapper .ytv-input-group {
            display: flex;
            gap: 20px;
            margin-bottom: 25px;
            position: relative;
        }

        #ytv-widget-wrapper .ytv-url-input {
            flex: 1;
            padding: 22px 28px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 20px;
            font-size: 16px;
            font-weight: 500;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            outline: none;
            color: var(--ytv-text-primary);
            box-shadow: var(--ytv-shadow-md);
        }

        #ytv-widget-wrapper .ytv-url-input:focus {
            border-color: var(--ytv-primary-color);
            box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.2), var(--ytv-shadow-lg);
            transform: translateY(-2px);
        }

        #ytv-widget-wrapper .ytv-url-input.ytv-error {
            border-color: #f44336;
            box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.2);
        }

        #ytv-widget-wrapper .ytv-url-input::placeholder {
            color: rgba(102, 102, 102, 0.6);
            font-weight: 500;
        }

        #ytv-widget-wrapper .ytv-fetch-btn {
            padding: 22px 45px;
            background: var(--ytv-success-gradient);
            color: white;
            border: none;
            border-radius: 20px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            min-width: 200px;
            position: relative;
            overflow: hidden;
            box-shadow: var(--ytv-shadow-lg);
        }

        #ytv-widget-wrapper .ytv-fetch-btn:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: var(--ytv-shadow-2xl);
            background: linear-gradient(135deg, #f06292, #e91e63);
        }

        #ytv-widget-wrapper .ytv-fetch-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        #ytv-widget-wrapper .ytv-fetch-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }

        #ytv-widget-wrapper .ytv-fetch-btn:hover::before {
            left: 100%;
        }

        #ytv-widget-wrapper .ytv-loading {
            display: none;
            text-align: center;
            padding: 30px;
            color: rgba(255, 255, 255, 0.9);
        }

        #ytv-widget-wrapper .ytv-spinner {
            width: 50px;
            height: 50px;
            border: 4px solid rgba(255, 255, 255, 0.3);
            border-top: 4px solid var(--ytv-primary-color);
            border-radius: 50%;
            animation: ytv-spin 1s linear infinite;
            margin: 0 auto 20px;
        }

        @keyframes ytv-spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        #ytv-widget-wrapper .ytv-thumbnails-preview-section {
            display: none;
            background: var(--ytv-glass-bg);
            backdrop-filter: blur(30px);
            border: 1px solid var(--ytv-glass-border);
            padding: 40px;
            border-radius: 30px;
            box-shadow: var(--ytv-shadow-2xl);
            margin-bottom: 40px;
            animation: ytv-slideInLeft 0.8s ease-out;
        }

        #ytv-widget-wrapper .ytv-video-info-header {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(15px);
            border-radius: 25px;
            padding: 30px;
            margin-bottom: 40px;
            border: 1px solid rgba(255, 255, 255, 0.15);
        }

        #ytv-widget-wrapper .ytv-video-preview-card {
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 25px;
            align-items: center;
            margin-bottom: 25px;
        }

        #ytv-widget-wrapper .ytv-video-thumbnail-preview {
            width: 120px;
            height: 90px;
            border-radius: 15px;
            object-fit: cover;
            box-shadow: var(--ytv-shadow-lg);
            transition: transform 0.3s ease;
        }

        #ytv-widget-wrapper .ytv-video-thumbnail-preview:hover {
            transform: scale(1.05);
        }

        #ytv-widget-wrapper .ytv-video-details {
            flex: 1;
        }

        #ytv-widget-wrapper .ytv-video-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 8px;
            line-height: 1.3;
            color: white;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        #ytv-widget-wrapper .ytv-video-channel {
            font-size: 16px;
            color: rgba(255, 255, 255, 0.8);
            font-weight: 500;
            margin-bottom: 5px;
        }

        #ytv-widget-wrapper .ytv-video-stats {
            display: flex;
            gap: 20px;
            align-items: center;
        }

        #ytv-widget-wrapper .ytv-stat-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: rgba(255, 255, 255, 0.9);
            font-size: 14px;
            font-weight: 600;
            background: rgba(255, 255, 255, 0.1);
            padding: 8px 12px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
        }

        #ytv-widget-wrapper .ytv-stat-icon {
            width: 20px;
            height: 20px;
            background: var(--ytv-orange-gradient);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
            color: white;
        }

        #ytv-widget-wrapper .ytv-thumbnails-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 25px;
            margin-bottom: 30px;
        }

        #ytv-widget-wrapper .ytv-thumbnail-card {
            background: var(--ytv-surface);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(20px);
            box-shadow: var(--ytv-shadow-md);
            padding: 20px;
        }

        #ytv-widget-wrapper .ytv-thumbnail-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--ytv-success-gradient);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        #ytv-widget-wrapper .ytv-thumbnail-card:hover::before {
            transform: scaleX(1);
        }

        #ytv-widget-wrapper .ytv-thumbnail-card:hover {
            border-color: var(--ytv-primary-color);
            transform: translateY(-8px);
            box-shadow: var(--ytv-shadow-2xl);
        }

        #ytv-widget-wrapper .ytv-thumbnail-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        #ytv-widget-wrapper .ytv-thumbnail-quality-badge {
            background: var(--ytv-success-gradient);
            color: white;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            box-shadow: var(--ytv-shadow-sm);
        }

        #ytv-widget-wrapper .ytv-thumbnail-resolution {
            color: var(--ytv-text-secondary);
            font-size: 14px;
            font-weight: 600;
        }

        #ytv-widget-wrapper .ytv-thumbnail-image-container {
            position: relative;
            border-radius: 15px;
            overflow: hidden;
            margin-bottom: 20px;
            box-shadow: var(--ytv-shadow-md);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        #ytv-widget-wrapper .ytv-thumbnail-card:hover .ytv-thumbnail-image-container {
            transform: scale(1.02);
            box-shadow: var(--ytv-shadow-lg);
        }

        #ytv-widget-wrapper .ytv-thumbnail-image {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 15px;
        }

        #ytv-widget-wrapper .ytv-thumbnail-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(233, 30, 99, 0.8), rgba(156, 39, 176, 0.8));
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
            border-radius: 15px;
        }

        #ytv-widget-wrapper .ytv-thumbnail-card:hover .ytv-thumbnail-overlay {
            opacity: 1;
        }

        #ytv-widget-wrapper .ytv-overlay-content {
            text-align: center;
            color: white;
        }

        #ytv-widget-wrapper .ytv-overlay-title {
            font-size: 18px;
            font-weight: 700;
            margin-bottom: 5px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
        }

        #ytv-widget-wrapper .ytv-overlay-subtitle {
            font-size: 14px;
            font-weight: 500;
            opacity: 0.9;
            text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
        }

        #ytv-widget-wrapper .ytv-thumbnail-info {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 20px;
        }

        #ytv-widget-wrapper .ytv-info-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: var(--ytv-text-secondary);
            font-size: 13px;
            font-weight: 600;
        }

        #ytv-widget-wrapper .ytv-info-icon {
            width: 16px;
            height: 16px;
            background: var(--ytv-purple-gradient);
            border-radius: 4px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 8px;
            color: white;
        }

        #ytv-widget-wrapper .ytv-thumbnail-actions {
            text-align: center;
        }

        #ytv-widget-wrapper .ytv-thumbnail-download-btn {
            width: 100%;
            padding: 15px 25px;
            background: var(--ytv-success-gradient);
            color: white;
            border: none;
            border-radius: 15px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: var(--ytv-shadow-md);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        #ytv-widget-wrapper .ytv-thumbnail-download-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--ytv-shadow-xl);
        }

        #ytv-widget-wrapper .ytv-thumbnail-download-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transition: left 0.5s;
        }

        #ytv-widget-wrapper .ytv-thumbnail-download-btn:hover::before {
            left: 100%;
        }

        #ytv-widget-wrapper .ytv-download-icon {
            font-size: 18px;
        }

        #ytv-widget-wrapper .ytv-error-message {
            background: linear-gradient(135deg, #f44336, #d32f2f);
            color: white;
            padding: 20px;
            border-radius: 18px;
            margin-top: 20px;
            display: none;
            font-weight: 600;
            box-shadow: var(--ytv-shadow-lg);
        }

        #ytv-widget-wrapper .ytv-notification {
            position: fixed;
            top: 30px;
            right: 30px;
            background: var(--ytv-success-gradient);
            color: white;
            padding: 20px 25px;
            border-radius: 18px;
            font-weight: 600;
            z-index: 1001;
            transform: translateX(120%);
            transition: transform 0.3s ease;
            box-shadow: var(--ytv-shadow-xl);
            backdrop-filter: blur(20px);
        }

        #ytv-widget-wrapper .ytv-notification.ytv-show {
            transform: translateX(0);
        }

        #ytv-widget-wrapper .ytv-preview-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(10px);
        }

        #ytv-widget-wrapper .ytv-preview-modal-content {
            position: relative;
            margin: 5% auto;
            padding: 0;
            width: 90%;
            max-width: 600px;
            background: var(--ytv-surface);
            border-radius: 20px;
            box-shadow: var(--ytv-shadow-2xl);
            overflow: hidden;
        }

        #ytv-widget-wrapper .ytv-preview-modal-header {
            background: var(--ytv-success-gradient);
            color: white;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        #ytv-widget-wrapper .ytv-preview-modal-title {
            font-size: 20px;
            font-weight: 700;
        }

        #ytv-widget-wrapper .ytv-preview-modal-close {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            font-size: 20px;
            cursor: pointer;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        #ytv-widget-wrapper .ytv-preview-modal-body {
            padding: 20px;
            text-align: center;
        }

        #ytv-widget-wrapper .ytv-preview-image {
            max-width: 100%;
            max-height: 400px;
            border-radius: 10px;
            box-shadow: var(--ytv-shadow-lg);
            margin-bottom: 20px;
        }

        #ytv-widget-wrapper .ytv-preview-info {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
            margin-bottom: 20px;
        }

        #ytv-widget-wrapper .ytv-preview-info-item {
            background: rgba(255, 255, 255, 0.1);
            padding: 10px;
            border-radius: 8px;
            text-align: center;
        }

        #ytv-widget-wrapper .ytv-preview-info-label {
            font-size: 12px;
            color: var(--ytv-text-secondary);
            font-weight: 600;
            margin-bottom: 5px;
        }

        #ytv-widget-wrapper .ytv-preview-info-value {
            font-size: 14px;
            color: var(--ytv-text-primary);
            font-weight: 700;
        }

        #ytv-widget-wrapper .ytv-preview-download-btn {
            padding: 12px 24px;
            background: var(--ytv-success-gradient);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 0 auto;
        }

        #ytv-widget-wrapper .ytv-thumbnail-preview-btn {
            background: var(--ytv-purple-gradient);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            padding: 8px 16px;
            margin-bottom: 8px;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        /* Enhanced Responsive Design */
        @media (max-width: 1200px) {
            #ytv-widget-wrapper .ytv-container {
                max-width: 100%;
                padding: 15px;
            }

            #ytv-widget-wrapper .ytv-thumbnails-grid {
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
                gap: 20px;
            }
					#ytv-widget-wrapper .ytv-input-group {
	display: flex;
	gap: 20px;
	margin-bottom: 25px;
	position: relative;
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-video-preview-card {
	display: flex;
	gap: 25px;
	align-items: center;
	margin-bottom: 25px;
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-logo-text-container {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-direction: column;
}
        }

        @media (max-width: 1024px) {
            #ytv-widget-wrapper .ytv-logo-text {
                font-size: 40px;
            }

            #ytv-widget-wrapper .ytv-features-bar {
                gap: 20px;
            }

            #ytv-widget-wrapper .ytv-feature-item {
                font-size: 14px;
                padding: 12px 18px;
            }
					#ytv-widget-wrapper .ytv-input-group {
	display: flex;
	gap: 20px;
	margin-bottom: 25px;
	position: relative;
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-video-preview-card {
	display: flex;
	gap: 25px;
	align-items: center;
	margin-bottom: 25px;
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-logo-text-container {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-bottom: 25px;
	flex-direction: column;
}
			
        }

        @media (max-width: 768px) {
            #ytv-widget-wrapper .ytv-container {
                padding: 10px;
            }

            #ytv-widget-wrapper .ytv-header {
                margin-bottom: 30px;
                padding: 20px 0;
            }

            #ytv-widget-wrapper .ytv-logo {
                flex-direction: column;
                gap: 15px;
            }

            #ytv-widget-wrapper .ytv-logo-text-container {
                flex-direction: column;
                gap: 10px;
                align-items: center;
            }

            #ytv-widget-wrapper .ytv-youtube-logo-icon,
            #ytv-widget-wrapper .ytv-camera-logo-icon {
                width: 40px;
                height: 40px;
                font-size: 20px;
            }

            #ytv-widget-wrapper .ytv-logo-icon {
                width: 60px;
                height: 60px;
                font-size: 28px;
            }

            #ytv-widget-wrapper .ytv-logo-text {
                font-size: 32px;
                text-align: center;
            }

            #ytv-widget-wrapper .ytv-subtitle {
                font-size: 18px;
            }

            #ytv-widget-wrapper .ytv-features-bar {
                gap: 15px;
                justify-content: center;
            }

            #ytv-widget-wrapper .ytv-feature-item {
                font-size: 13px;
                padding: 10px 16px;
            }

            #ytv-widget-wrapper .ytv-input-section,
            #ytv-widget-wrapper .ytv-thumbnails-preview-section {
                padding: 25px;
                margin-bottom: 25px;
            }

            #ytv-widget-wrapper .ytv-input-group {
                flex-direction: column;
                gap: 15px;
            }

            #ytv-widget-wrapper .ytv-url-input {
                padding: 18px 22px;
                font-size: 15px;
            }

            #ytv-widget-wrapper .ytv-fetch-btn {
                padding: 18px 35px;
                min-width: 100%;
            }

            #ytv-widget-wrapper .ytv-video-title {
                font-size: 22px;
            }

            #ytv-widget-wrapper .ytv-thumbnails-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            #ytv-widget-wrapper .ytv-thumbnail-card {
                padding: 20px;
            }

            #ytv-widget-wrapper .ytv-video-preview-card {
                grid-template-columns: 1fr;
                text-align: center;
                gap: 15px;
            }

            #ytv-widget-wrapper .ytv-video-stats {
                justify-content: center;
            }
					#ytv-widget-wrapper .ytv-video-stats {
	display: flex;
	gap: 20px;
	align-items: center;
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-stat-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 14px;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.1);
	padding: 8px 12px;
	border-radius: 20px;
	backdrop-filter: blur(10px);
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-input-group {
	display: flex;
	gap: 20px;
	margin-bottom: 25px;
	position: relative;
	flex-direction: column;
}
					
					#ytv-widget-wrapper .ytv-video-preview-card {
	display: flex;
	gap: 25px;
	align-items: center;
	margin-bottom: 25px;
	flex-direction: column;
}
        }

        @media (max-width: 480px) {
            #ytv-widget-wrapper .ytv-container {
                padding: 8px;
            }

            #ytv-widget-wrapper .ytv-logo-text {
                font-size: 28px;
            }

            #ytv-widget-wrapper .ytv-subtitle {
                font-size: 16px;
            }

            #ytv-widget-wrapper .ytv-features-bar {
                flex-direction: column;
                align-items: center;
                gap: 10px;
            }

            #ytv-widget-wrapper .ytv-feature-item {
                width: 100%;
                max-width: 300px;
                justify-content: center;
            }

            #ytv-widget-wrapper .ytv-input-section,
            #ytv-widget-wrapper .ytv-thumbnails-preview-section {
                padding: 20px;
                border-radius: 25px;
            }

            #ytv-widget-wrapper .ytv-url-input {
                padding: 16px 20px;
                font-size: 14px;
            }

            #ytv-widget-wrapper .ytv-fetch-btn {
                padding: 16px 30px;
                font-size: 15px;
            }

            #ytv-widget-wrapper .ytv-video-title {
                font-size: 20px;
            }

            #ytv-widget-wrapper .ytv-thumbnail-card {
                padding: 15px;
            }

            #ytv-widget-wrapper .ytv-notification {
                top: 20px;
                right: 20px;
                left: 20px;
                padding: 15px 20px;
                font-size: 14px;
            }
					#ytv-widget-wrapper .ytv-video-stats {
	display: flex;
	gap: 20px;
	align-items: center;
	flex-direction: column;
}
					#ytv-widget-wrapper .ytv-stat-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 14px;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.1);
	padding: 8px 12px;
	border-radius: 20px;
	backdrop-filter: blur(10px);
	flex-direction: column;
}
        }

/* --- Codex CSS updates --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

#ytv-widget-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#ytv-widget-wrapper {
    --ytv-primary-color: #e62117;
    --ytv-primary-dark: #b9140d;
    --ytv-primary-light: #ff5a4f;
    --ytv-secondary-color: #111827;
    --ytv-accent-color: #f59e0b;
    --ytv-success-gradient: linear-gradient(135deg, #ff3b30 0%, #c9180f 100%);
    --ytv-purple-gradient: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    --ytv-orange-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --ytv-blue-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --ytv-glass-bg: rgba(255, 255, 255, 0.82);
    --ytv-glass-border: rgba(229, 231, 235, 0.9);
    --ytv-text-primary: #111827;
    --ytv-text-secondary: #4b5563;
    --ytv-text-light: #6b7280;
    --ytv-surface: rgba(255, 255, 255, 0.96);
    --ytv-surface-hover: #ffffff;
    --ytv-shadow-sm: 0 2px 4px rgba(17, 24, 39, 0.08);
    --ytv-shadow-md: 0 6px 14px rgba(17, 24, 39, 0.1);
    --ytv-shadow-lg: 0 12px 24px rgba(17, 24, 39, 0.14);
    --ytv-shadow-xl: 0 18px 34px rgba(17, 24, 39, 0.16);
    --ytv-shadow-2xl: 0 26px 60px rgba(17, 24, 39, 0.18);
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 14%, rgba(255, 59, 48, 0.16) 0%, transparent 34%),
        radial-gradient(circle at 86% 20%, rgba(245, 158, 11, 0.12) 0%, transparent 30%),
        linear-gradient(135deg, #fff7f6 0%, #f8fafc 46%, #eef2ff 100%);
    color: var(--ytv-text-primary);
}

#ytv-widget-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(17, 24, 39, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    pointer-events: none;
    z-index: 0;
}

#ytv-widget-wrapper .ytv-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 20px 48px;
    position: relative;
    z-index: 1;
}

#ytv-widget-wrapper .ytv-header {
    text-align: center;
    margin-bottom: 34px;
    padding: 34px 0 18px;
    animation: ytv-fadeInDown 1s ease-out;
}

@keyframes ytv-fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ytv-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ytv-slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ytv-pulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

#ytv-widget-wrapper .ytv-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 20px;
    min-width: 0;
}

#ytv-widget-wrapper .ytv-logo-icon {
    width: 72px;
    height: 72px;
    background: var(--ytv-success-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 34px;
    font-weight: 900;
    box-shadow: var(--ytv-shadow-xl);
    position: relative;
    overflow: hidden;
    animation: ytv-pulse 2s ease-in-out infinite;
    flex: 0 0 auto;
}

#ytv-widget-wrapper .ytv-logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.42), transparent);
    transform: rotate(45deg);
    animation: ytv-shine 3s infinite;
}

@keyframes ytv-shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }

    100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
}

#ytv-widget-wrapper .ytv-logo-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-width: 0;
}

#ytv-widget-wrapper .ytv-youtube-logo-icon {
    width: 48px;
    height: 48px;
    background: #ff0000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 23px;
    animation: ytv-youtubeFloat 3s ease-in-out infinite;
    box-shadow: 0 8px 22px rgba(255, 0, 0, 0.24);
    flex: 0 0 auto;
}

#ytv-widget-wrapper .ytv-logo-text {
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 900;
    line-height: 1.08;
    color: var(--ytv-text-primary);
    letter-spacing: 0;
    text-wrap: balance;
}

#ytv-widget-wrapper .ytv-camera-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--ytv-primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 23px;
    animation: ytv-cameraBounce 2s ease-in-out infinite;
    box-shadow: 0 8px 22px rgba(230, 33, 23, 0.24);
    flex: 0 0 auto;
}

@keyframes ytv-youtubeFloat {
    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.05);
    }
}

@keyframes ytv-cameraBounce {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-5px) rotate(-5deg);
    }

    75% {
        transform: translateY(-5px) rotate(5deg);
    }
}

#ytv-widget-wrapper .ytv-subtitle {
    color: var(--ytv-text-secondary);
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 0;
    text-shadow: none;
    text-wrap: balance;
}

#ytv-widget-wrapper .ytv-features-bar {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 34px;
    flex-wrap: wrap;
}

#ytv-widget-wrapper .ytv-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ytv-text-primary);
    font-size: 15px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--ytv-glass-border);
    transition: all 0.3s ease;
    box-shadow: var(--ytv-shadow-sm);
}

#ytv-widget-wrapper .ytv-feature-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--ytv-shadow-lg);
    background: var(--ytv-surface-hover);
    border-color: rgba(230, 33, 23, 0.22);
}

#ytv-widget-wrapper .ytv-feature-icon {
    width: 24px;
    height: 24px;
    background: var(--ytv-success-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: 800;
    flex: 0 0 auto;
}

#ytv-widget-wrapper .ytv-input-section {
    background: var(--ytv-glass-bg);
    backdrop-filter: blur(28px);
    border: 1px solid var(--ytv-glass-border);
    padding: 34px;
    border-radius: 24px;
    box-shadow: var(--ytv-shadow-xl);
    margin-bottom: 24px;
    animation: ytv-fadeInUp 1s ease-out 0.2s both;
}

#ytv-widget-wrapper .ytv-input-group {
    display: flex;
    gap: 16px;
    margin-bottom: 22px;
    position: relative;
    align-items: stretch;
}

#ytv-widget-wrapper .ytv-url-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 20px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
    color: var(--ytv-text-primary);
    box-shadow: var(--ytv-shadow-sm);
}

#ytv-widget-wrapper .ytv-url-input:focus {
    border-color: var(--ytv-primary-color);
    box-shadow: 0 0 0 4px rgba(230, 33, 23, 0.14), var(--ytv-shadow-md);
    transform: translateY(-1px);
}

#ytv-widget-wrapper .ytv-url-input.ytv-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.14);
}

#ytv-widget-wrapper .ytv-url-input::placeholder {
    color: rgba(75, 85, 99, 0.68);
    font-weight: 500;
}

#ytv-widget-wrapper .ytv-fetch-btn {
    padding: 20px 36px;
    background: var(--ytv-success-gradient);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 190px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--ytv-shadow-lg);
    white-space: nowrap;
}

#ytv-widget-wrapper .ytv-fetch-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--ytv-shadow-xl);
    background: linear-gradient(135deg, #ff5a4f, #e62117);
}

#ytv-widget-wrapper .ytv-fetch-btn:focus-visible,
#ytv-widget-wrapper .ytv-thumbnail-download-btn:focus-visible,
#ytv-widget-wrapper .ytv-thumbnail-preview-btn:focus-visible,
#ytv-widget-wrapper .ytv-preview-download-btn:focus-visible,
#ytv-widget-wrapper .ytv-preview-modal-close:focus-visible {
    outline: 3px solid rgba(230, 33, 23, 0.28);
    outline-offset: 3px;
}

#ytv-widget-wrapper .ytv-fetch-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#ytv-widget-wrapper .ytv-fetch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#ytv-widget-wrapper .ytv-fetch-btn:hover::before {
    left: 100%;
}

#ytv-widget-wrapper .ytv-loading {
    display: none;
    text-align: center;
    padding: 26px;
    color: var(--ytv-text-secondary);
    font-weight: 700;
}

#ytv-widget-wrapper .ytv-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(230, 33, 23, 0.16);
    border-top: 4px solid var(--ytv-primary-color);
    border-radius: 50%;
    animation: ytv-spin 1s linear infinite;
    margin: 0 auto 18px;
}

@keyframes ytv-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#ytv-widget-wrapper .ytv-thumbnails-preview-section {
    display: none;
    background: var(--ytv-glass-bg);
    backdrop-filter: blur(28px);
    border: 1px solid var(--ytv-glass-border);
    padding: 34px;
    border-radius: 24px;
    box-shadow: var(--ytv-shadow-xl);
    margin-bottom: 40px;
    animation: ytv-slideInLeft 0.8s ease-out;
}

#ytv-widget-wrapper .ytv-video-info-header {
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 26px;
    margin-bottom: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

#ytv-widget-wrapper .ytv-video-preview-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 22px;
    align-items: center;
    margin-bottom: 0;
}

#ytv-widget-wrapper .ytv-video-thumbnail-preview {
    width: 120px;
    height: 90px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: var(--ytv-shadow-lg);
    transition: transform 0.3s ease;
    background: #e5e7eb;
}

#ytv-widget-wrapper .ytv-video-thumbnail-preview:hover {
    transform: scale(1.05);
}

#ytv-widget-wrapper .ytv-video-details {
    flex: 1;
    min-width: 0;
}

#ytv-widget-wrapper .ytv-video-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.3;
    color: white;
    text-shadow: none;
    overflow-wrap: anywhere;
}

#ytv-widget-wrapper .ytv-video-channel {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

#ytv-widget-wrapper .ytv-video-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#ytv-widget-wrapper .ytv-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    padding: 9px 12px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

#ytv-widget-wrapper .ytv-stat-icon {
    width: 20px;
    height: 20px;
    background: var(--ytv-orange-gradient);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    flex: 0 0 auto;
}

#ytv-widget-wrapper .ytv-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 22px;
    margin-bottom: 30px;
}

#ytv-widget-wrapper .ytv-thumbnail-card {
    background: var(--ytv-surface);
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: var(--ytv-shadow-md);
    padding: 18px;
}

#ytv-widget-wrapper .ytv-thumbnail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ytv-success-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#ytv-widget-wrapper .ytv-thumbnail-card:hover::before {
    transform: scaleX(1);
}

#ytv-widget-wrapper .ytv-thumbnail-card:hover {
    border-color: rgba(230, 33, 23, 0.42);
    transform: translateY(-6px);
    box-shadow: var(--ytv-shadow-xl);
}

#ytv-widget-wrapper .ytv-thumbnail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

#ytv-widget-wrapper .ytv-thumbnail-quality-badge {
    background: var(--ytv-success-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
    box-shadow: var(--ytv-shadow-sm);
    white-space: nowrap;
}

#ytv-widget-wrapper .ytv-thumbnail-resolution {
    color: var(--ytv-text-secondary);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

#ytv-widget-wrapper .ytv-thumbnail-image-container {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: var(--ytv-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #f3f4f6;
}

#ytv-widget-wrapper .ytv-thumbnail-card:hover .ytv-thumbnail-image-container {
    transform: scale(1.02);
    box-shadow: var(--ytv-shadow-lg);
}

#ytv-widget-wrapper .ytv-thumbnail-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}

#ytv-widget-wrapper .ytv-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230, 33, 23, 0.84), rgba(17, 24, 39, 0.82));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 14px;
    padding: 18px;
}

#ytv-widget-wrapper .ytv-thumbnail-card:hover .ytv-thumbnail-overlay {
    opacity: 1;
}

#ytv-widget-wrapper .ytv-overlay-content {
    text-align: center;
    color: white;
}

#ytv-widget-wrapper .ytv-overlay-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#ytv-widget-wrapper .ytv-overlay-subtitle {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.92;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
}

#ytv-widget-wrapper .ytv-thumbnail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

#ytv-widget-wrapper .ytv-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ytv-text-secondary);
    font-size: 13px;
    font-weight: 700;
    min-width: 0;
}

#ytv-widget-wrapper .ytv-info-icon {
    width: 16px;
    height: 16px;
    background: var(--ytv-purple-gradient);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: white;
    flex: 0 0 auto;
}

#ytv-widget-wrapper .ytv-thumbnail-actions {
    text-align: center;
}

#ytv-widget-wrapper .ytv-thumbnail-download-btn {
    width: 100%;
    padding: 15px 22px;
    background: var(--ytv-success-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--ytv-shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
}

#ytv-widget-wrapper .ytv-thumbnail-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--ytv-shadow-xl);
}

#ytv-widget-wrapper .ytv-thumbnail-download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

#ytv-widget-wrapper .ytv-thumbnail-download-btn:hover::before {
    left: 100%;
}

#ytv-widget-wrapper .ytv-download-icon {
    font-size: 18px;
    flex: 0 0 auto;
}

#ytv-widget-wrapper .ytv-error-message {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: white;
    padding: 18px 20px;
    border-radius: 16px;
    margin-top: 18px;
    display: none;
    font-weight: 700;
    box-shadow: var(--ytv-shadow-lg);
    overflow-wrap: anywhere;
}

#ytv-widget-wrapper .ytv-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    max-width: min(420px, calc(100vw - 40px));
    background: var(--ytv-success-gradient);
    color: white;
    padding: 18px 22px;
    border-radius: 16px;
    font-weight: 700;
    z-index: 1001;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    box-shadow: var(--ytv-shadow-xl);
    backdrop-filter: blur(20px);
}

#ytv-widget-wrapper .ytv-notification.ytv-show {
    transform: translateX(0);
}

#ytv-widget-wrapper .ytv-preview-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(17, 24, 39, 0.82);
    backdrop-filter: blur(10px);
    padding: 20px;
}

#ytv-widget-wrapper .ytv-preview-modal-content {
    position: relative;
    margin: 5vh auto;
    padding: 0;
    width: 100%;
    max-width: 640px;
    background: var(--ytv-surface);
    border-radius: 20px;
    box-shadow: var(--ytv-shadow-2xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

#ytv-widget-wrapper .ytv-preview-modal-header {
    background: var(--ytv-success-gradient);
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

#ytv-widget-wrapper .ytv-preview-modal-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
}

#ytv-widget-wrapper .ytv-preview-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background 0.2s ease, transform 0.2s ease;
}

#ytv-widget-wrapper .ytv-preview-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

#ytv-widget-wrapper .ytv-preview-modal-body {
    padding: 22px;
    text-align: center;
}

#ytv-widget-wrapper .ytv-preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: var(--ytv-shadow-lg);
    margin-bottom: 20px;
    object-fit: contain;
}

#ytv-widget-wrapper .ytv-preview-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

#ytv-widget-wrapper .ytv-preview-info-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    min-width: 0;
}

#ytv-widget-wrapper .ytv-preview-info-label {
    font-size: 12px;
    color: var(--ytv-text-secondary);
    font-weight: 700;
    margin-bottom: 5px;
}

#ytv-widget-wrapper .ytv-preview-info-value {
    font-size: 14px;
    color: var(--ytv-text-primary);
    font-weight: 800;
    overflow-wrap: anywhere;
}

#ytv-widget-wrapper .ytv-preview-download-btn {
    padding: 13px 24px;
    background: var(--ytv-success-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    min-height: 46px;
    box-shadow: var(--ytv-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#ytv-widget-wrapper .ytv-preview-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--ytv-shadow-lg);
}

#ytv-widget-wrapper .ytv-thumbnail-preview-btn {
    background: var(--ytv-purple-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    padding: 11px 16px;
    margin-bottom: 8px;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#ytv-widget-wrapper .ytv-thumbnail-preview-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--ytv-shadow-md);
}

@media (max-width: 1200px) {
    #ytv-widget-wrapper .ytv-container {
        max-width: 1200px;
        padding: 24px 18px 42px;
    }

    #ytv-widget-wrapper .ytv-thumbnails-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    #ytv-widget-wrapper .ytv-logo {
        flex-direction: column;
    }

    #ytv-widget-wrapper .ytv-logo-text-container {
        flex-direction: column;
        gap: 12px;
    }

    #ytv-widget-wrapper .ytv-features-bar {
        gap: 12px;
    }

    #ytv-widget-wrapper .ytv-feature-item {
        font-size: 14px;
        padding: 11px 16px;
    }

    #ytv-widget-wrapper .ytv-input-group {
        flex-direction: column;
    }

    #ytv-widget-wrapper .ytv-fetch-btn {
        width: 100%;
    }

    #ytv-widget-wrapper .ytv-video-preview-card {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    #ytv-widget-wrapper .ytv-video-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    #ytv-widget-wrapper .ytv-container {
        padding: 18px 12px 34px;
    }

    #ytv-widget-wrapper .ytv-header {
        margin-bottom: 24px;
        padding: 18px 0 8px;
    }

    #ytv-widget-wrapper .ytv-logo {
        gap: 14px;
    }

    #ytv-widget-wrapper .ytv-youtube-logo-icon,
    #ytv-widget-wrapper .ytv-camera-logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    #ytv-widget-wrapper .ytv-logo-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    #ytv-widget-wrapper .ytv-logo-text {
        font-size: 34px;
        text-align: center;
    }

    #ytv-widget-wrapper .ytv-subtitle {
        font-size: 17px;
    }

    #ytv-widget-wrapper .ytv-features-bar {
        gap: 10px;
        justify-content: center;
        margin-bottom: 26px;
    }

    #ytv-widget-wrapper .ytv-feature-item {
        font-size: 13px;
        padding: 10px 14px;
    }

    #ytv-widget-wrapper .ytv-input-section,
    #ytv-widget-wrapper .ytv-thumbnails-preview-section {
        padding: 22px;
        margin-bottom: 24px;
        border-radius: 20px;
    }

    #ytv-widget-wrapper .ytv-input-group {
        gap: 14px;
    }

    #ytv-widget-wrapper .ytv-url-input {
        padding: 17px 18px;
        font-size: 15px;
    }

    #ytv-widget-wrapper .ytv-fetch-btn {
        padding: 17px 26px;
        min-width: 100%;
    }

    #ytv-widget-wrapper .ytv-video-info-header {
        padding: 20px;
        border-radius: 18px;
    }

    #ytv-widget-wrapper .ytv-video-title {
        font-size: 21px;
    }

    #ytv-widget-wrapper .ytv-thumbnails-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #ytv-widget-wrapper .ytv-thumbnail-card {
        padding: 18px;
    }

    #ytv-widget-wrapper .ytv-video-stats {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }

    #ytv-widget-wrapper .ytv-stat-item {
        justify-content: center;
        white-space: normal;
    }

    #ytv-widget-wrapper .ytv-preview-modal {
        padding: 12px;
    }

    #ytv-widget-wrapper .ytv-preview-modal-content {
        margin: 3vh auto;
    }
}

@media (max-width: 480px) {
    #ytv-widget-wrapper .ytv-container {
        padding: 14px 10px 28px;
    }

    #ytv-widget-wrapper .ytv-logo-text {
        font-size: 29px;
    }

    #ytv-widget-wrapper .ytv-subtitle {
        font-size: 16px;
    }

    #ytv-widget-wrapper .ytv-features-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #ytv-widget-wrapper .ytv-feature-item {
        width: 100%;
        justify-content: center;
    }

    #ytv-widget-wrapper .ytv-input-section,
    #ytv-widget-wrapper .ytv-thumbnails-preview-section {
        padding: 18px;
        border-radius: 18px;
    }

    #ytv-widget-wrapper .ytv-url-input {
        padding: 15px 16px;
        font-size: 14px;
    }

    #ytv-widget-wrapper .ytv-fetch-btn {
        padding: 15px 20px;
        font-size: 15px;
        white-space: normal;
    }

    #ytv-widget-wrapper .ytv-video-title {
        font-size: 19px;
    }

    #ytv-widget-wrapper .ytv-thumbnail-card {
        padding: 15px;
        border-radius: 18px;
    }

    #ytv-widget-wrapper .ytv-thumbnail-header,
    #ytv-widget-wrapper .ytv-thumbnail-info,
    #ytv-widget-wrapper .ytv-preview-info {
        grid-template-columns: 1fr;
    }

    #ytv-widget-wrapper .ytv-thumbnail-header {
        display: grid;
        justify-items: start;
    }

    #ytv-widget-wrapper .ytv-notification {
        top: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
        padding: 15px 18px;
        font-size: 14px;
    }

    #ytv-widget-wrapper .ytv-preview-modal-header,
    #ytv-widget-wrapper .ytv-preview-modal-body {
        padding: 16px;
    }

    #ytv-widget-wrapper .ytv-preview-modal-title {
        font-size: 18px;
    }
}