@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@400;500;600;700;800&display=swap");

/* Global reset - scoped to prevent conflicts */
        .ytdv-wrapper * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        /* Main wrapper - replaces body styling */
        .ytdv-wrapper {
            font-family: 'Inter', sans-serif;
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            color: #ffffff;
            min-height: 100vh;
            line-height: 1.5;
        }
        
        .ytdv-container {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
        }
        
        /* Header */
        .ytdv-header {
            text-align: center;
            margin-bottom: 40px;
            padding: 30px 0;
        }
        
        .ytdv-logo-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .ytdv-logo {
            width: 50px;
            height: 50px;
            background: #ffffff;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        }
        
        .ytdv-youtube-icon {
            width: 28px;
            height: 28px;
            fill: #ff0000;
        }
        
        .ytdv-title {
            font-size: 2.2rem;
            font-weight: 800;
            background: linear-gradient(135deg, #ffffff, #f1f2f6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 8px;
        }
        
        .ytdv-subtitle {
            font-size: 1rem;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 500;
        }
        
        /* Input Section */
        .ytdv-input-section {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 30px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }
        
        .ytdv-input-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: white;
            margin-bottom: 15px;
            text-align: center;
        }
        
        .ytdv-input-group {
            display: flex;
            gap: 12px;
            margin-bottom: 20px;
        }
        
        .ytdv-input-field {
            flex: 1;
            padding: 14px 18px !important;
            border: 2px solid rgba(255, 255, 255, 0.2) !important;
            border-radius: 12px !important;
            background: rgba(255, 255, 255, 0.1) !important;
            color: #ffffff !important;
            font-size: 14px !important;
            font-weight: 500;
            transition: all 0.3s ease !important;
            font-family: 'Inter', sans-serif !important;
        }
        
        .ytdv-input-field:focus {
            outline: none;
            border-color: #ffffff;
            background: rgba(255, 255, 255, 0.15);
        }
        
        .ytdv-input-field::placeholder {
            color: rgba(255, 255, 255, 0.6);
        }
        
        .ytdv-btn {
            padding: 14px 20px;
            border: none;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: 'Inter', sans-serif;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .ytdv-btn-paste {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        
        .ytdv-btn-paste:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }
        
        .ytdv-btn-find {
            background: #dce7fd;
            color: #1e3c72;
            width: 100%;
            justify-content: center;
            padding: 16px;
            font-size: 16px;
            font-weight: 700;
            box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
        }
        
        .ytdv-btn-find:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
        }
        
        .ytdv-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
        }
        
        .ytdv-btn-icon {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }
        
        /* Loading */
        .ytdv-loading {
            display: none;
            text-align: center;
            padding: 40px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            margin-bottom: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .ytdv-loading-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-top: 3px solid #ffffff;
            border-radius: 50%;
            animation: ytdv-spin 1s linear infinite;
            margin: 0 auto 20px;
        }
        
        .ytdv-loading-text {
            font-size: 1.1rem;
            font-weight: 600;
            color: white;
        }
        
        /* Results */
        .ytdv-results {
            display: none;
        }
        
        .ytdv-video-card {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        }
        
        /* Video Header */
        .ytdv-video-header {
            padding: 25px;
            display: grid;
            grid-template-columns: 1fr;
            gap: 20px;
        }
        
        .ytdv-thumbnail-container {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            aspect-ratio: 16/9;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }
        
        .ytdv-thumbnail {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .ytdv-video-info .ytdv-video-title {
            font-size: 1.4rem;
            font-weight: 700;
            color: white;
            margin-bottom: 15px;
            line-height: 1.3;
        }
        
        .ytdv-channel-info {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            margin-bottom: 20px;
        }
        
        .ytdv-channel-avatar {
            width: 40px;
            height: 40px;
            background: #ffffff;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .ytdv-channel-icon {
            width: 20px;
            height: 20px;
            fill: #ff0000;
        }
        
        .ytdv-channel-details .ytdv-channel-name {
            font-size: 1rem;
            font-weight: 600;
            color: white;
            margin-bottom: 2px;
        }
        
        .ytdv-channel-link {
            color: #ffffff;
            text-decoration: none;
            font-weight: 600;
        }
        
        .ytdv-channel-link:hover {
            color: rgba(255, 255, 255, 0.8);
        }
        
        .ytdv-verified-text {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.85rem;
        }
        
        /* Stats Grid */
        .ytdv-stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
            gap: 15px;
        }
        
        .ytdv-stat-card {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 15px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: transform 0.3s ease;
        }
        
        .ytdv-stat-card:hover {
            transform: translateY(-3px);
        }
        
        .ytdv-stat-icon {
            width: 24px;
            height: 24px;
            margin: 0 auto 8px;
            padding: 6px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .ytdv-stat-card.ytdv-views .ytdv-stat-icon {
            background: #ffffff;
        }
        
        .ytdv-stat-card.ytdv-likes .ytdv-stat-icon {
            background: #ffffff;
        }
        
        .ytdv-stat-card.ytdv-published .ytdv-stat-icon {
            background: #ffffff;
        }
        
        .ytdv-stat-icon svg {
            width: 12px;
            height: 12px;
            fill: #1e3c72;
        }
        
        .ytdv-stat-label {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.7);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 4px;
        }
        
        .ytdv-stat-value {
            font-size: 1.1rem;
            font-weight: 700;
            color: white;
        }
        
        /* Description Section */
        .ytdv-description-section {
            padding: 25px;
            background: rgba(255, 255, 255, 0.05);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .ytdv-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .ytdv-section-title {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .ytdv-section-icon {
            width: 40px;
            height: 40px;
            background: #ffffff;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .ytdv-section-icon svg {
            width: 20px;
            height: 20px;
            fill: #1e3c72;
        }
        
        .ytdv-section-title-text .ytdv-section-heading {
            font-size: 1.2rem;
            font-weight: 700;
            color: white;
            margin-bottom: 2px;
        }
        
        .ytdv-section-title-text .ytdv-section-subheading {
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.7);
        }
        
        .ytdv-copy-btn {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            padding: 10px 16px;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .ytdv-copy-btn:hover {
            transform: translateY(-2px);
        }
        
        .ytdv-copy-btn.ytdv-copied {
            background: rgba(255, 255, 255, 0.3);
        }
        
        .ytdv-copy-icon {
            width: 14px;
            height: 14px;
            fill: currentColor;
        }
        
        .ytdv-description-content {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 12px;
            border-left: 4px solid #ffffff;
            color: rgba(255, 255, 255, 0.9);
            line-height: 1.6;
            font-size: 0.9rem;
            white-space: pre-wrap;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        /* Captions Section */
        .ytdv-captions-section {
            padding: 25px;
            background: rgba(255, 255, 255, 0.05);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .ytdv-captions-icon {
            background: #ffffff;
        }
        
        .ytdv-captions-content {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 12px;
            border-left: 4px solid #ffffff;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .ytdv-caption-item {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 10px;
            font-size: 0.9rem;
        }
        
        .ytdv-caption-dot {
            width: 8px;
            height: 8px;
            background: #ffffff;
            border-radius: 50%;
        }
        
        .ytdv-caption-label {
            color: #ffffff;
            font-weight: 600;
        }
        
        .ytdv-caption-value {
            color: rgba(255, 255, 255, 0.9);
        }
        
        /* Error State */
        .ytdv-error {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 30px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            text-align: center;
            margin-bottom: 30px;
        }
        
        .ytdv-error-icon {
            font-size: 3rem;
            margin-bottom: 15px;
        }
        
        .ytdv-error .ytdv-error-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: #ffffff;
            margin-bottom: 10px;
        }
        
        .ytdv-error .ytdv-error-message {
            font-size: 0.95rem;
            color: rgba(255, 255, 255, 0.8);
            margin-bottom: 8px;
        }
        
        .ytdv-error .ytdv-error-details {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.85rem;
        }
        
        /* Features Grid */
        .ytdv-features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 15px;
            margin-bottom: 30px;
        }
        
        .ytdv-feature-card {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
            transition: transform 0.3s ease;
        }
        
        .ytdv-feature-card:hover {
            transform: translateY(-5px);
        }
        
        .ytdv-feature-icon {
            font-size: 1.8rem;
            margin-bottom: 8px;
            display: block;
        }
        
        .ytdv-feature-text {
            font-size: 0.85rem;
            font-weight: 600;
            color: white;
        }
        
        /* Animations */
        @keyframes ytdv-spin {
            to {
                transform: rotate(360deg);
            }
        }
        
        /* Custom Scrollbar - scoped to wrapper */
        .ytdv-wrapper ::-webkit-scrollbar {
            width: 6px;
        }
        
        .ytdv-wrapper ::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
        }
        
        .ytdv-wrapper ::-webkit-scrollbar-thumb {
            background: #ffffff;
            border-radius: 3px;
        }
        
        /* Responsive Design */
        @media (max-width: 992px) {
            .ytdv-container {
                max-width: 90%;
                padding: 15px;
            }
            
            .ytdv-title {
                font-size: 2rem;
            }
            
            .ytdv-input-section {
                padding: 25px;
            }
            
            .ytdv-video-header {
                padding: 20px;
            }
            
            .ytdv-stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
					
					.ytdv-logo {
	width: 50px;
	height: 50px;
	background: #ffffff;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
	margin-top: 80px;
}
        }
        
        @media (max-width: 768px) {
            .ytdv-container {
                max-width: 95%;
                padding: 10px;
            }
            
            .ytdv-title {
                font-size: 1.8rem;
            }
            
            .ytdv-input-group {
                flex-direction: column;
            }
            
            .ytdv-input-section,
            .ytdv-loading,
            .ytdv-error {
                padding: 20px;
            }
            
            .ytdv-video-header,
            .ytdv-description-section,
            .ytdv-captions-section {
                padding: 15px;
            }
            
            .ytdv-section-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .ytdv-stats-grid {
                grid-template-columns: 1fr;
            }
            
            .ytdv-features-grid {
                grid-template-columns: repeat(2, 1fr);
            }
					
					.ytdv-logo {
	width: 50px;
	height: 50px;
	background: #ffffff;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
	margin-top: 80px;
}
        }
        
        @media (max-width: 600px) {
            .ytdv-container {
                padding: 8px;
            }
            
            .ytdv-title {
                font-size: 1.6rem;
            }
            
            .ytdv-logo-container {
                flex-direction: column;
                gap: 10px;
            }
            
            .ytdv-btn-find {
                padding: 14px;
                font-size: 15px;
            }
            
            .ytdv-features-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            
            .ytdv-feature-card {
                padding: 15px;
            }
					
					.ytdv-logo {
	width: 50px;
	height: 50px;
	background: #ffffff;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
	margin-top: 80px;
}
        }
        
        @media (max-width: 400px) {
            .ytdv-container {
                padding: 5px;
            }
            
            .ytdv-title {
                font-size: 1.4rem;
            }
            
            .ytdv-header {
                padding: 20px 0;
                margin-bottom: 20px;
            }
            
            .ytdv-input-section {
                padding: 15px;
                margin-bottom: 15px;
            }
            
            .ytdv-input-title {
                font-size: 1.1rem;
            }
            
            .ytdv-btn {
                padding: 12px 16px;
                font-size: 13px;
            }
            
            .ytdv-features-grid {
                grid-template-columns: 1fr;
            }
					
					.ytdv-logo {
	width: 50px;
	height: 50px;
	background: #ffffff;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
	margin-top: 80px;
}
        }
        
        @media (max-width: 375px) {
            .ytdv-title {
                font-size: 1.3rem;
            }
            
            .ytdv-subtitle {
                font-size: 0.9rem;
            }
            
            .ytdv-input-section {
                padding: 12px;
            }
            
            .ytdv-input-field {
                padding: 12px 15px;
                font-size: 13px;
            }
            
            .ytdv-btn {
                padding: 10px 14px;
                font-size: 12px;
            }
            
            .ytdv-stats-grid {
                gap: 10px;
            }
            
            .ytdv-stat-card {
                padding: 12px;
            }
					
					.ytdv-logo {
	width: 50px;
	height: 50px;
	background: #ffffff;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
	margin-top: 80px;
}
        }
        
        /* Search Again Button */
        .ytdv-search-again-section {
            padding: 25px;
            background: rgba(255, 255, 255, 0.05);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            text-align: center;
        }
        
        .ytdv-btn-search-again {
            background: #ffffff;
            color: #1e3c72;
            border: none;
            padding: 14px 24px;
            border-radius: 12px;
            cursor: pointer;
            font-weight: 600;
            font-size: 1rem;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
        }
        
        .ytdv-btn-search-again:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
        }
        
        .ytdv-search-again-icon {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }

/* --- Codex CSS updates --- */
/* Global reset - scoped to prevent conflicts */
.ytdv-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main wrapper - replaces body styling */
.ytdv-wrapper {
    position: relative;
    width: 100%;
    font-family: 'Inter', sans-serif;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 0, 0, 0.16), transparent 30%),
        linear-gradient(135deg, #111827 0%, #1f2937 48%, #991b1b 100%);
    color: #f9fafb;
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

.ytdv-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px;
}

/* Header */
.ytdv-header {
    text-align: center;
    margin-bottom: 36px;
    padding: 28px 0 14px;
}

.ytdv-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 20px;
}

.ytdv-logo {
    width: 58px;
    height: 58px;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 42px rgba(127, 29, 29, 0.28);
    flex: 0 0 auto;
}

.ytdv-youtube-icon {
    width: 32px;
    height: 32px;
    fill: #ff0000;
}

.ytdv-title {
    font-size: clamp(2rem, 4vw, 3.6rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #fee2e2 55%, #fecaca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    line-height: 1.12;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.ytdv-subtitle {
    font-size: 1rem;
    color: #fecaca;
    font-weight: 600;
}

/* Input Section */
.ytdv-input-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(22px);
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 26px;
    border: 1px solid rgba(254, 202, 202, 0.24);
    box-shadow: 0 18px 50px rgba(17, 24, 39, 0.32);
}

.ytdv-input-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    text-align: center;
}

.ytdv-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    width: 100%;
}

.ytdv-input-field {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 15px 18px !important;
    border: 2px solid rgba(254, 202, 202, 0.28) !important;
    border-radius: 12px !important;
    background: rgba(17, 24, 39, 0.48) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 500;
    transition: all 0.25s ease !important;
    font-family: 'Inter', sans-serif !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ytdv-input-field:focus {
    outline: none;
    border-color: #f87171 !important;
    background: rgba(17, 24, 39, 0.72) !important;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18);
}

.ytdv-input-field::placeholder {
    color: rgba(254, 226, 226, 0.68);
}

.ytdv-btn {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.ytdv-btn-paste {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(254, 202, 202, 0.24);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.22);
}

.ytdv-btn-paste:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.3);
}

.ytdv-btn-find {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(185, 28, 28, 0.34);
}

.ytdv-btn-find:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 18px 38px rgba(185, 28, 28, 0.42);
}

.ytdv-btn:focus-visible,
.ytdv-copy-btn:focus-visible,
.ytdv-btn-search-again:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.28);
}

.ytdv-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.ytdv-btn-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex: 0 0 auto;
}

/* Loading */
.ytdv-loading {
    display: none;
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(22px);
    border-radius: 18px;
    margin-bottom: 30px;
    border: 1px solid rgba(254, 202, 202, 0.24);
}

.ytdv-loading-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(254, 202, 202, 0.35);
    border-top: 3px solid #f87171;
    border-radius: 50%;
    animation: ytdv-spin 1s linear infinite;
    margin: 0 auto 20px;
}

.ytdv-loading-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

/* Results */
.ytdv-results {
    display: none;
}

.ytdv-video-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(22px);
    border-radius: 18px;
    border: 1px solid rgba(254, 202, 202, 0.24);
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(17, 24, 39, 0.32);
}

/* Video Header */
.ytdv-video-header {
    padding: 26px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.ytdv-thumbnail-container {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 14px 30px rgba(17, 24, 39, 0.32);
}

.ytdv-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ytdv-video-info .ytdv-video-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.ytdv-channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: rgba(17, 24, 39, 0.42);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(254, 202, 202, 0.16);
}

.ytdv-channel-avatar {
    width: 42px;
    height: 42px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.ytdv-channel-icon {
    width: 20px;
    height: 20px;
    fill: #ff0000;
}

.ytdv-channel-details {
    min-width: 0;
}

.ytdv-channel-details .ytdv-channel-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
}

.ytdv-channel-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.ytdv-channel-link:hover {
    color: #fecaca;
}

.ytdv-verified-text {
    color: #fecaca;
    font-size: 0.85rem;
}

/* Stats Grid */
.ytdv-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.ytdv-stat-card {
    background: rgba(17, 24, 39, 0.42);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(254, 202, 202, 0.18);
    transition: transform 0.25s ease, background 0.25s ease;
    min-width: 0;
}

.ytdv-stat-card:hover {
    transform: translateY(-3px);
    background: rgba(17, 24, 39, 0.56);
}

.ytdv-stat-icon {
    width: 28px;
    height: 28px;
    margin: 0 auto 9px;
    padding: 7px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytdv-stat-card.ytdv-views .ytdv-stat-icon {
    background: #fee2e2;
}

.ytdv-stat-card.ytdv-likes .ytdv-stat-icon {
    background: #fee2e2;
}

.ytdv-stat-card.ytdv-published .ytdv-stat-icon {
    background: #fee2e2;
}

.ytdv-stat-icon svg {
    width: 13px;
    height: 13px;
    fill: #991b1b;
}

.ytdv-stat-label {
    font-size: 0.75rem;
    color: #fecaca;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ytdv-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    overflow-wrap: anywhere;
}

/* Description Section */
.ytdv-description-section {
    padding: 26px;
    background: rgba(17, 24, 39, 0.2);
    border-top: 1px solid rgba(254, 202, 202, 0.14);
}

.ytdv-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.ytdv-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ytdv-section-icon {
    width: 42px;
    height: 42px;
    background: #fee2e2;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.ytdv-section-icon svg {
    width: 20px;
    height: 20px;
    fill: #991b1b;
}

.ytdv-section-title-text {
    min-width: 0;
}

.ytdv-section-title-text .ytdv-section-heading {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 2px;
    overflow-wrap: anywhere;
}

.ytdv-section-title-text .ytdv-section-subheading {
    font-size: 0.85rem;
    color: #fecaca;
}

.ytdv-copy-btn {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(254, 202, 202, 0.22);
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ytdv-copy-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.ytdv-copy-btn.ytdv-copied {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(134, 239, 172, 0.4);
}

.ytdv-copy-icon {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex: 0 0 auto;
}

.ytdv-description-content {
    background: rgba(17, 24, 39, 0.48);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    color: #fef2f2;
    line-height: 1.65;
    font-size: 0.95rem;
    white-space: pre-wrap;
    border: 1px solid rgba(254, 202, 202, 0.16);
    overflow-wrap: anywhere;
}

/* Captions Section */
.ytdv-captions-section {
    padding: 26px;
    background: rgba(17, 24, 39, 0.2);
    border-top: 1px solid rgba(254, 202, 202, 0.14);
}

.ytdv-captions-icon {
    background: #fee2e2;
}

.ytdv-captions-content {
    background: rgba(17, 24, 39, 0.48);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    border: 1px solid rgba(254, 202, 202, 0.16);
}

.ytdv-caption-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    min-width: 0;
}

.ytdv-caption-item:last-child {
    margin-bottom: 0;
}

.ytdv-caption-dot {
    width: 8px;
    height: 8px;
    background: #f87171;
    border-radius: 50%;
    flex: 0 0 auto;
}

.ytdv-caption-label {
    color: #ffffff;
    font-weight: 700;
}

.ytdv-caption-value {
    color: #fef2f2;
    overflow-wrap: anywhere;
}

/* Error State */
.ytdv-error {
    background: rgba(127, 29, 29, 0.28);
    backdrop-filter: blur(22px);
    border-radius: 18px;
    padding: 30px;
    border: 1px solid rgba(248, 113, 113, 0.32);
    text-align: center;
    margin-bottom: 30px;
}

.ytdv-error-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.ytdv-error .ytdv-error-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
}

.ytdv-error .ytdv-error-message {
    font-size: 0.95rem;
    color: #fee2e2;
    margin-bottom: 8px;
}

.ytdv-error .ytdv-error-details {
    color: #fecaca;
    font-size: 0.85rem;
}

/* Features Grid */
.ytdv-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.ytdv-feature-card {
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(22px);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(254, 202, 202, 0.2);
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    min-width: 0;
}

.ytdv-feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(248, 113, 113, 0.42);
}

.ytdv-feature-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
    line-height: 1;
}

.ytdv-feature-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
}

/* Animations */
@keyframes ytdv-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar - scoped to wrapper */
.ytdv-wrapper ::-webkit-scrollbar {
    width: 6px;
}

.ytdv-wrapper ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.ytdv-wrapper ::-webkit-scrollbar-thumb {
    background: #f87171;
    border-radius: 3px;
}

/* Search Again Button */
.ytdv-search-again-section {
    padding: 26px;
    background: rgba(17, 24, 39, 0.2);
    border-top: 1px solid rgba(254, 202, 202, 0.14);
    text-align: center;
}

.ytdv-btn-search-again {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 14px 30px rgba(185, 28, 28, 0.34);
}

.ytdv-btn-search-again:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 18px 38px rgba(185, 28, 28, 0.42);
}

.ytdv-search-again-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex: 0 0 auto;
}

/* Responsive Design */
@media (max-width: 992px) {
    .ytdv-container {
        max-width: 1200px;
        padding: 26px 18px;
    }

    .ytdv-title {
        font-size: clamp(1.9rem, 5vw, 2.8rem);
    }

    .ytdv-input-section {
        padding: 25px;
    }

    .ytdv-video-header {
        padding: 22px;
    }

    .ytdv-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ytdv-logo {
        width: 54px;
        height: 54px;
    }
}

@media (max-width: 768px) {
    .ytdv-container {
        max-width: 1200px;
        padding: 22px 14px;
    }

    .ytdv-title {
        font-size: clamp(1.7rem, 7vw, 2.25rem);
    }

    .ytdv-logo-container {
        align-items: flex-start;
    }

    .ytdv-input-group {
        flex-direction: column;
    }

    .ytdv-input-section,
    .ytdv-loading,
    .ytdv-error {
        padding: 20px;
    }

    .ytdv-video-header,
    .ytdv-description-section,
    .ytdv-captions-section {
        padding: 18px;
    }

    .ytdv-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .ytdv-section-title {
        align-items: flex-start;
    }

    .ytdv-copy-btn,
    .ytdv-btn-search-again {
        width: 100%;
    }

    .ytdv-stats-grid {
        grid-template-columns: 1fr;
    }

    .ytdv-features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ytdv-logo {
        width: 52px;
        height: 52px;
    }
}

@media (max-width: 600px) {
    .ytdv-container {
        padding: 18px 12px;
    }

    .ytdv-header {
        padding: 18px 0 8px;
        margin-bottom: 22px;
    }

    .ytdv-title {
        font-size: clamp(1.55rem, 8vw, 2rem);
    }

    .ytdv-logo-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .ytdv-btn-find {
        padding: 14px;
        font-size: 15px;
    }

    .ytdv-features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ytdv-feature-card {
        padding: 16px 12px;
    }

    .ytdv-description-content,
    .ytdv-captions-content {
        padding: 16px;
    }

    .ytdv-logo {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 400px) {
    .ytdv-container {
        padding: 14px 10px;
    }

    .ytdv-title {
        font-size: 1.45rem;
    }

    .ytdv-header {
        padding: 14px 0 6px;
        margin-bottom: 18px;
    }

    .ytdv-input-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .ytdv-input-title {
        font-size: 1.1rem;
    }

    .ytdv-btn {
        padding: 12px 14px;
        font-size: 13px;
        width: 100%;
    }

    .ytdv-features-grid {
        grid-template-columns: 1fr;
    }

    .ytdv-logo {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 375px) {
    .ytdv-title {
        font-size: 1.35rem;
    }

    .ytdv-subtitle {
        font-size: 0.9rem;
    }

    .ytdv-input-section {
        padding: 12px;
    }

    .ytdv-input-field {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }

    .ytdv-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .ytdv-stats-grid {
        gap: 10px;
    }

    .ytdv-stat-card {
        padding: 12px;
    }

    .ytdv-logo {
        width: 46px;
        height: 46px;
    }
}