@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");

/* Wrapper class to avoid conflicts */
     
            
            .ytw-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

        /* Reset styles within wrapper */
        .ytw-wrapper * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Animated Background Elements */
        .ytw-background-effects {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 0;
            overflow: hidden;
        }

        .ytw-floating-orb {
            position: absolute;
            border-radius: 50%;
            filter: blur(60px);
            animation: ytw-float 8s ease-in-out infinite;
        }

        .ytw-orb-1 {
            width: 384px;
            height: 384px;
            background: rgba(79, 70, 229, 0.15);
            top: 25%;
            left: 25%;
            animation-delay: 0s;
        }

        .ytw-orb-2 {
            width: 384px;
            height: 384px;
            background: rgba(99, 102, 241, 0.15);
            bottom: 25%;
            right: 25%;
            animation-delay: 1s;
        }

        .ytw-orb-3 {
            width: 256px;
            height: 256px;
            background: rgba(129, 140, 248, 0.15);
            top: 75%;
            left: 50%;
            animation-delay: 2s;
        }

        @keyframes ytw-float {
            0%, 100% {
                transform: translateY(0px) scale(1);
                opacity: 0.5;
            }
            50% {
                transform: translateY(-30px) scale(1.1);
                opacity: 0.8;
            }
        }

        .ytw-container {
            position: relative;
            z-index: 1;
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem 1rem;
        }

        /* Header Styles */
        .ytw-header {
            text-align: center;
            margin-bottom: 3rem;
        }

        .ytw-header-content {
            align-items: center;
            gap: 1rem;
            margin-bottom: 1.5rem;
            width: 100%;
            margin: 40px 0;
            justify-content: center;
            flex-direction: column;
            display: flex;
        }

   
			
			.ytw-app-icon {
	position: relative;
	width: 4rem;
	height: 4rem;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	border-radius: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

        .ytw-app-icon::before {
            content: '';
            position: absolute;
            inset: -4px;
            background: linear-gradient(135deg, #8b5cf6, #6366f1);
            border-radius: 1.5rem;
            filter: blur(8px);
            opacity: 0.3;
            animation: ytw-pulse 2s ease-in-out infinite;
        }

        .ytw-app-icon svg {
            width: 2.5rem;
            height: 2.5rem;
            fill: white;
            position: relative;
            z-index: 1;
        }

        @keyframes ytw-pulse {
            0%, 100% {
                opacity: 0.3;
            }
            50% {
                opacity: 0.6;
            }
        }

     
			
			.ytw-title {
	font-size: clamp(1.2rem, 2vw, 3.5rem);
	font-weight: 900;
	background: linear-gradient(135deg, #e0e7ff, #c7d2fe, #a5b4fc);
	background-size: 200% 200%;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	animation: ytw-gradientShift 3s ease-in-out infinite;
	letter-spacing: -0.025em;
}

        @keyframes ytw-gradientShift {
            0%, 100% {
                background-position: 0% 50%;
            }
            50% {
                background-position: 100% 50%;
            }
        }

        .ytw-subtitle {
            font-size: 1.25rem;
            color: #cbd5e1;
            font-weight: 500;
            margin-bottom: 2rem;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .ytw-features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            max-width: 800px;
            margin: 0 auto;
        }

        .ytw-feature-card {
            padding: 1.5rem;
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(10px);
            border-radius: 1rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
            transition: all 0.3s ease;
            text-align: center;
        }

        .ytw-feature-card:hover {
            transform: translateY(-5px) scale(1.05);
            border-color: rgba(99, 102, 241, 0.5);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
        }

        .ytw-feature-icon {
            font-size: 2.5rem;
            margin-bottom: 0.75rem;
            display: block;
        }

        .ytw-feature-text {
            font-size: 0.95rem;
            color: #e2e8f0;
            font-weight: 600;
        }

        /* Input Section */
        .ytw-input-section {
            max-width: 100%;
            margin: 0 auto 3rem;
            padding: 2rem;
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(20px);
            border-radius: 1.5rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
        }

        .ytw-input-wrapper {
            display: flex;
            gap: 0.75rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .ytw-input-field {
            flex: 1 !important;
            min-width: 300px !important;
            padding: 1.25rem 1.75rem !important;
            background: rgba(15, 23, 42, 0.7) !important;
            border: 1px solid #475569 !important;
            border-radius: 1rem !important;
            color: white !important;
            font-size: 1.125rem !important;
            font-weight: 500 !important;
            transition: all 0.3s ease !important;
            position: relative !important;
        }

        .ytw-input-field:focus {
            outline: none;
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
            background: rgba(15, 23, 42, 0.9);
        }

        .ytw-input-field::placeholder {
            color: rgba(148, 163, 184, 0.7);
        }

        .ytw-btn {
            padding: 1rem 1.5rem;
            border: none;
            border-radius: 0.75rem;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            white-space: nowrap;
        }

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

        .ytw-btn:hover::before {
            left: 100%;
        }

        .ytw-btn-paste {
            background: linear-gradient(135deg, #475569, #334155);
            color: white;
            box-shadow: 0 8px 25px rgba(71, 85, 105, 0.4);
        }

        .ytw-btn-paste:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 35px rgba(71, 85, 105, 0.5);
        }

     
            
            .ytw-btn-search {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    width: 100%;
    font-size: 1.125rem;
    padding: 1.25rem;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

        .ytw-btn-search:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
        }

        .ytw-btn-search:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* Loading Styles */
        .ytw-loading {
            display: none;
            text-align: center;
            padding: 3rem 2rem;
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(20px);
            border-radius: 1.5rem;
            margin: 2rem 0;
            border: 1px solid rgba(100, 116, 139, 0.3);
        }

        .ytw-spinner {
            width: 3rem;
            height: 3rem;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-left: 3px solid #6366f1;
            border-radius: 50%;
            animation: ytw-spin 1s linear infinite;
            margin: 0 auto 1rem;
        }

        @keyframes ytw-spin {
            to {
                transform: rotate(360deg);
            }
        }

        /* Channel Styles */
        .ytw-channel-container {
            display: none;
            space-y: 2rem;
        }

        .ytw-channel-banner {
            width: 100%;
            height: clamp(200px, 30vw, 320px);
            background-size: cover;
            background-position: center;
            border-radius: 1.5rem;
            margin-bottom: 2rem;
            position: relative;
            overflow: hidden;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
        }

        .ytw-channel-banner::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 120px;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
        }

        .ytw-channel-header {
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(20px);
            border-radius: 1.5rem;
            padding: 2rem;
            margin-bottom: 2rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
        }

        .ytw-channel-main-info {
            display: flex;
            gap: 1.5rem;
            align-items: flex-start;
            margin-bottom: 2rem;
            flex-wrap: wrap;
        }

        .ytw-channel-avatar {
            position: relative;
            flex-shrink: 0;
        }

        .ytw-channel-avatar img {
            width: clamp(96px, 15vw, 128px);
            height: clamp(96px, 15vw, 128px);
            border-radius: 50%;
            border: 4px solid rgba(99, 102, 241, 0.5);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
        }

        .ytw-channel-avatar::before {
            content: '';
            position: absolute;
            inset: -8px;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            border-radius: 50%;
            filter: blur(8px);
            opacity: 0.3;
        }

        .ytw-channel-details {
            flex: 1;
            min-width: 300px;
        }

        .ytw-channel-name {
            font-size: clamp(1.5rem, 4vw, 2.5rem);
            font-weight: 800;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .ytw-verified-badge {
            width: 2rem;
            height: 2rem;
            background: linear-gradient(135deg, #10b981, #059669);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1rem;
            font-weight: bold;
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
            flex-shrink: 0;
        }

        .ytw-channel-handle {
            font-size: clamp(1rem, 2.5vw, 1.25rem);
            color: #cbd5e1;
            margin-bottom: 1rem;
            font-weight: 500;
        }

        .ytw-channel-description {
            background: rgba(15, 23, 42, 0.7);
            backdrop-filter: blur(10px);
            border-radius: 0.75rem;
            padding: 1rem !important;
            margin-bottom: 1.5rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
            line-height: 1.6 !important;
            color: #e2e8f0;
            width: 100% !important;
        }

        .ytw-channel-links {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
            margin-bottom: 1.5rem;
        }

        .ytw-channel-link {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
            border: 1px solid rgba(99, 102, 241, 0.3);
            color: #c7d2fe;
            text-decoration: none;
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            font-weight: 500;
            transition: all 0.3s ease;
            font-size: 0.875rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .ytw-channel-link:hover {
            background: rgba(99, 102, 241, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
        }

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

        .ytw-stat-card {
            padding: 1.5rem;
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(10px);
            border-radius: 1rem;
            border: 1px solid rgba(100, 116, 139, 0.5);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .ytw-stat-card:hover {
            transform: translateY(-5px) scale(1.05);
            border-color: rgba(99, 102, 241, 0.5);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        }

        .ytw-stat-icon {
            width: 3rem;
            height: 3rem;
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            transition: transform 0.3s ease;
        }

        .ytw-stat-card:hover .ytw-stat-icon {
            transform: scale(1.1);
        }

        .ytw-stat-icon.users {
            background: linear-gradient(135deg, #3b82f6, #6366f1);
        }

        .ytw-stat-icon.views {
            background: linear-gradient(135deg, #10b981, #14b8a6);
        }

        .ytw-stat-icon.calendar {
            background: linear-gradient(135deg, #8b5cf6, #a855f7);
        }

        .ytw-stat-icon.location {
            background: linear-gradient(135deg, #f59e0b, #ef4444);
        }

        .ytw-stat-value {
            font-size: clamp(1.25rem, 3vw, 2rem);
            font-weight: 800;
            color: #f1f5f9;
            margin-bottom: 0.25rem;
            word-break: break-word;
        }

        .ytw-stat-label {
            font-size: 0.875rem;
            color: #94a3b8;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        /* Videos Section */
        .ytw-videos-section {
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(20px);
            border-radius: 1.5rem;
            padding: 2rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
        }

        .ytw-section-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 2rem;
        }

        .ytw-section-icon {
            width: 2rem;
            height: 2rem;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .ytw-section-title {
            font-size: clamp(1.5rem, 4vw, 2rem);
            font-weight: 700;
            color: white;
        }

        .ytw-videos-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 1.5rem;
        }

        .ytw-video-card {
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(10px);
            border-radius: 1rem;
            overflow: hidden;
            border: 1px solid rgba(100, 116, 139, 0.5);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .ytw-video-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
            border-color: rgba(99, 102, 241, 0.5);
        }

        .ytw-video-thumbnail {
            width: 100%;
            aspect-ratio: 16/9;
            background-size: cover;
            background-position: center;
            position: relative;
            overflow: hidden;
        }

        .ytw-video-thumbnail::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0);
            transition: all 0.3s ease;
            z-index: 1;
        }

        .ytw-video-card:hover .ytw-video-thumbnail::before {
            background: rgba(0, 0, 0, 0.3);
        }

        .ytw-play-button {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(1);
            width: 4rem;
            height: 4rem;
            background: rgba(99, 102, 241, 0.95);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 1;
            transition: all 0.3s ease;
            z-index: 2;
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
        }

        .ytw-video-card:hover .ytw-play-button {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.1);
        }

        .ytw-play-button svg {
            width: 1.5rem;
            height: 1.5rem;
            fill: white;
            margin-left: 2px;
        }

        .ytw-video-duration {
            position: absolute;
            bottom: 0.5rem;
            right: 0.5rem;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 0.25rem 0.5rem;
            border-radius: 0.375rem;
            font-size: 0.75rem;
            font-weight: 600;
            z-index: 3;
        }

        .ytw-video-info {
            padding: 1rem;
        }

        .ytw-video-title {
            font-size: 0.875rem;
            font-weight: 600;
            line-height: 1.4;
            margin-bottom: 0.5rem;
            color: white;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .ytw-video-card:hover .ytw-video-title {
            color: #c7d2fe;
        }

        .ytw-video-meta {
            color: #94a3b8;
            font-size: 0.75rem;
            font-weight: 500;
        }

        /* Modal Styles */
        .ytw-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.95);
            backdrop-filter: blur(10px);
            z-index: 1000;
            padding: 1rem;
        }

        .ytw-modal-content {
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            top: 50%;
            transform: translateY(-50%);
        }

        .ytw-modal-close {
            position: absolute;
            top: -3rem;
            right: 0;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.75rem;
            border-radius: 50%;
            width: 3rem;
            height: 3rem;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .ytw-modal-close:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

        .ytw-video-player {
            width: 100%;
            aspect-ratio: 16/9;
            border: none;
            border-radius: 0.75rem;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
        }

        /* Error Styles */
        .ytw-error {
            background: rgba(239, 68, 68, 0.2);
            border: 1px solid rgba(239, 68, 68, 0.4);
            color: #fca5a5;
            padding: 2rem;
            border-radius: 1rem;
            text-align: center;
            margin: 2rem 0;
            backdrop-filter: blur(10px);
        }

        .ytw-error h3 {
            font-weight: 700;
            margin-bottom: 0.5rem;
            font-size: 1.125rem;
        }

        /* Enhanced Download Modal Styles */
        .ytw-download-modal-content {
            max-width: 900px;
            max-height: 90vh;
            overflow-y: auto;
            background: rgba(30, 41, 59, 0.8);
            backdrop-filter: blur(20px);
            border-radius: 1.5rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
            padding: 2rem;
            margin: 2rem auto;
            position: relative;
        }

        .ytw-download-modal-header {
            text-align: center;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid rgba(100, 116, 139, 0.3);
        }

        .ytw-download-modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: white;
            margin-bottom: 1rem;
            line-height: 1.4;
        }

        .ytw-download-modal-thumbnail {
            width: 200px;
            height: auto;
            border-radius: 1rem;
            margin: 0 auto 1rem;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        .ytw-download-modal-info {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
            padding: 1rem;
            background: rgba(15, 23, 42, 0.7);
            border-radius: 1rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
        }

        .ytw-download-info-item {
            text-align: center;
        }

        .ytw-download-info-label {
            font-size: 0.875rem;
            color: #94a3b8;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 0.5rem;
        }

        .ytw-download-info-value {
            font-size: 1rem;
            color: #c7d2fe;
            font-weight: 600;
        }

        .ytw-download-formats-section {
            margin-bottom: 2rem;
        }

        .ytw-download-section-title {
            font-size: 1.25rem;
            font-weight: 700;
            color: white;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .ytw-download-section-icon {
            width: 1.5rem;
            height: 1.5rem;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            border-radius: 0.375rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.875rem;
        }

        .ytw-download-formats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1rem;
        }

        .ytw-download-format-card {
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(10px);
            border-radius: 1rem;
            padding: 1.5rem;
            border: 1px solid rgba(100, 116, 139, 0.5);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .ytw-download-format-card:hover {
            transform: translateY(-3px);
            border-color: rgba(99, 102, 241, 0.5);
            box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
        }

        .ytw-download-format-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }

        .ytw-download-format-type {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .ytw-download-format-icon {
            width: 2rem;
            height: 2rem;
            border-radius: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.875rem;
            font-weight: bold;
        }

        .ytw-download-format-icon.audio {
            background: linear-gradient(135deg, #8b5cf6, #a855f7);
        }

        .ytw-download-format-icon.video {
            background: linear-gradient(135deg, #10b981, #14b8a6);
        }

        .ytw-download-format-label {
            font-size: 1rem;
            font-weight: 600;
            color: white;
        }

        .ytw-download-format-quality {
            font-size: 0.875rem;
            color: #c7d2fe;
            font-weight: 600;
            background: rgba(99, 102, 241, 0.2);
            padding: 0.25rem 0.75rem;
            border-radius: 1rem;
            border: 1px solid rgba(99, 102, 241, 0.3);
        }

        .ytw-btn-download {
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            font-size: 0.875rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
        }

        .ytw-btn-download:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 12px 35px rgba(99, 102, 241, 0.4);
        }

        .ytw-btn-download:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        /* Enhanced Loading Animation */
        .ytw-download-loading {
            text-align: center;
            padding: 3rem 2rem;
        }

        .ytw-download-loading-spinner {
            width: 4rem;
            height: 4rem;
            margin: 0 auto 2rem;
            position: relative;
        }

        .ytw-download-loading-spinner::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 4px solid rgba(99, 102, 241, 0.2);
            border-radius: 50%;
        }

        .ytw-download-loading-spinner::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 4px solid transparent;
            border-top: 4px solid #6366f1;
            border-radius: 50%;
            animation: ytw-downloadSpin 1s linear infinite;
        }

        @keyframes ytw-downloadSpin {
            to {
                transform: rotate(360deg);
            }
        }

        .ytw-download-loading-text {
            font-size: 1.125rem;
            color: white;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .ytw-download-loading-subtext {
            font-size: 0.875rem;
            color: #94a3b8;
        }

        .ytw-download-loading-dots {
            display: inline-flex;
            gap: 0.25rem;
            margin-left: 0.5rem;
        }

        .ytw-download-loading-dot {
            width: 0.375rem;
            height: 0.375rem;
            background: #6366f1;
            border-radius: 50%;
            animation: ytw-downloadDots 1.5s ease-in-out infinite;
        }

        .ytw-download-loading-dot:nth-child(2) {
            animation-delay: 0.2s;
        }

        .ytw-download-loading-dot:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes ytw-downloadDots {
            0%, 60%, 100% {
                opacity: 0.3;
                transform: scale(0.8);
            }
            30% {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* Enhanced Progress Bar */
        .ytw-download-progress-container {
            margin-top: 2rem;
            padding: 2rem;
            background: rgba(30, 41, 59, 0.6);
            backdrop-filter: blur(10px);
            border-radius: 1rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
        }

        .ytw-download-progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }

        .ytw-download-progress-title {
            font-size: 1rem;
            font-weight: 600;
            color: white;
        }

        .ytw-download-progress-percentage {
            font-size: 1rem;
            font-weight: 700;
            color: #c7d2fe;
        }

        .ytw-download-progress-bar-container {
            width: 100%;
            height: 0.75rem;
            background: rgba(15, 23, 42, 0.7);
            border-radius: 0.375rem;
            overflow: hidden;
            margin-bottom: 1rem;
            border: 1px solid rgba(100, 116, 139, 0.3);
        }

        .ytw-download-progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #6366f1, #8b5cf6);
            border-radius: 0.375rem;
            transition: width 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .ytw-download-progress-bar::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            animation: ytw-progressShimmer 2s ease-in-out infinite;
        }

        @keyframes ytw-progressShimmer {
            0% {
                transform: translateX(-100%);
            }
            100% {
                transform: translateX(100%);
            }
        }

        .ytw-download-progress-actions {
            display: flex;
            gap: 1rem;
            justify-content: center;
        }

        .ytw-btn-cancel {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
            border: none;
            padding: 0.75rem 1.5rem;
            border-radius: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
        }

        .ytw-btn-cancel:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 35px rgba(239, 68, 68, 0.4);
        }

        .ytw-download-complete {
            text-align: center;
            padding: 2rem;
            background: rgba(16, 185, 129, 0.2);
            border: 1px solid rgba(16, 185, 129, 0.4);
            border-radius: 1rem;
            margin-top: 1rem;
        }

        .ytw-download-complete-icon {
            width: 3rem;
            height: 3rem;
            background: linear-gradient(135deg, #10b981, #059669);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1rem;
            color: white;
            font-size: 1.5rem;
        }

        .ytw-download-complete-text {
            font-size: 1.125rem;
            font-weight: 600;
            color: #10b981;
        }

        /* Responsive Design */
        @media (max-width: 375px) {
            .ytw-container {
                padding: 1rem;
            }
            
            .ytw-input-section {
                padding: 1rem;
            }
            
            .ytw-input-wrapper {
                flex-direction: column;
                gap: 0.5rem;
            }
            
            .ytw-input-field {
                min-width: unset !important;
                font-size: 1rem !important;
                padding: 0.75rem 1rem !important;
                width: 100%;
            }
            
            .ytw-btn {
                padding: 0.75rem 1rem;
                font-size: 0.875rem;
            }
            
            .ytw-channel-main-info {
                flex-direction: column;
                align-items: center;
                text-align: center;
                gap: 1rem;
            }
            
            .ytw-channel-name {
                justify-content: center;
                font-size: 1.5rem;
            }
            
            .ytw-stats-grid {
                grid-template-columns: 1fr;
                gap: 0.75rem;
            }
            
            .ytw-stat-card {
                padding: 1rem;
            }
            
            .ytw-videos-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
            
            .ytw-channel-header,
            .ytw-videos-section {
                padding: 1rem;
            }
            
            .ytw-download-modal-content {
                margin: 1rem;
                padding: 1rem;
            }
            
            .ytw-download-formats-grid {
                grid-template-columns: 1fr;
            }
            
            .ytw-download-modal-info {
                grid-template-columns: 1fr;
            }
            
            .ytw-app-icon {
                width: 3rem;
                height: 3rem;
            }
            
            .ytw-app-icon svg {
                width: 1.5rem;
                height: 1.5rem;
            }
					.ytw-stats-grid {
	grid-template-columns: repeat(2, 1fr);
}
        }

        @media (max-width: 400px) {
            .ytw-title {
                font-size: 1.75rem;
            }
            
            .ytw-subtitle {
                font-size: 1rem;
            }
            
            .ytw-features-grid {
                grid-template-columns: 1fr;
                gap: 0.5rem;
            }
            
            .ytw-feature-card {
                padding: 0.75rem;
            }
            
            .ytw-feature-icon {
                font-size: 1.5rem;
            }
            
            .ytw-feature-text {
                font-size: 0.75rem;
            }
					.ytw-stats-grid {
	grid-template-columns: repeat(2, 1fr);
}
        }

        @media (max-width: 600px) {
            .ytw-title {
                font-size: 2rem;
            }
            
            .ytw-subtitle {
                font-size: 1.125rem;
            }
            
            .ytw-features-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .ytw-channel-header {
                padding: 1.5rem;
            }
            
            .ytw-stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .ytw-videos-section {
                padding: 1.5rem;
            }
            
            .ytw-videos-grid {
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            }
            
            .ytw-download-modal-content {
                padding: 1.5rem;
            }
					.ytw-stats-grid {
	grid-template-columns: repeat(2, 1fr);
}
        }

        @media (max-width: 768px) {
            .ytw-container {
                padding: 1rem;
            }

            .ytw-features-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.75rem;
            }

            .ytw-input-section {
                padding: 1.5rem;
            }

            .ytw-input-wrapper {
                flex-direction: column;
                gap: 0.75rem;
            }

            .ytw-input-field {
                min-width: unset !important;
                font-size: 1rem !important;
                padding: 0.75rem 1rem !important;
                width: 100%;
            }

            .ytw-channel-main-info {
                flex-direction: column;
                align-items: center;
                text-align: center;
                gap: 1rem;
            }

            .ytw-channel-name {
                justify-content: center;
            }

            .ytw-stats-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.75rem;
            }

            .ytw-stat-card {
                padding: 1rem;
            }

            .ytw-videos-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            .ytw-channel-header,
            .ytw-videos-section {
                padding: 1.5rem;
            }

            .ytw-download-modal-content {
                margin: 1rem;
                padding: 1.5rem;
            }

            .ytw-download-formats-grid {
                grid-template-columns: 1fr;
            }

            .ytw-download-modal-info {
                grid-template-columns: 1fr;
            }
					.ytw-stats-grid {
	grid-template-columns: repeat(2, 1fr);
}
        }

        @media (max-width: 992px) {
            .ytw-videos-grid {
                grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            }
            
            .ytw-stats-grid {
                grid-template-columns: repeat(3, 1fr);
            }
            
            .ytw-download-formats-grid {
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            }
					.ytw-stats-grid {
	grid-template-columns: repeat(2, 1fr);
}
        }

       

        /* Utility Classes */
        .ytw-hidden {
            display: none;
        }

        .ytw-flex {
            display: flex;
        }

        .ytw-items-center {
            align-items: center;
        }

        .ytw-gap-2 {
            gap: 0.5rem;
        }

/* --- Codex CSS updates --- */
/* Wrapper class to avoid conflicts */
.ytw-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: radial-gradient(circle at 20% 15%, rgba(255, 0, 0, 0.16), transparent 34%), linear-gradient(135deg, #09090b 0%, #171717 48%, #2a0f12 100%);
    min-height: 100vh;
    width: 100%;
    color: #ffffff;
    overflow-x: hidden;
    position: relative;
}

/* Reset styles within wrapper */
.ytw-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Animated Background Elements */
.ytw-background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ytw-floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: ytw-float 8s ease-in-out infinite;
}

.ytw-orb-1 {
    width: 384px;
    height: 384px;
    background: rgba(255, 0, 0, 0.14);
    top: 15%;
    left: 12%;
    animation-delay: 0s;
}

.ytw-orb-2 {
    width: 384px;
    height: 384px;
    background: rgba(220, 38, 38, 0.13);
    bottom: 18%;
    right: 10%;
    animation-delay: 1s;
}

.ytw-orb-3 {
    width: 256px;
    height: 256px;
    background: rgba(250, 204, 21, 0.09);
    top: 68%;
    left: 48%;
    animation-delay: 2s;
}

@keyframes ytw-float {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.45;
    }
    50% {
        transform: translateY(-30px) scale(1.08);
        opacity: 0.7;
    }
}

.ytw-container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Styles */
.ytw-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.ytw-header-content {
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    margin: 40px 0;
    justify-content: center;
    flex-direction: column;
    display: flex;
}

.ytw-app-icon {
    position: relative;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, #ff0033, #b91c1c);
    border-radius: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 34px rgba(255, 0, 51, 0.34);
}

.ytw-app-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, #ef4444, #ff0033);
    border-radius: 1.25rem;
    filter: blur(8px);
    opacity: 0.28;
    animation: ytw-pulse 2s ease-in-out infinite;
}

.ytw-app-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    fill: white;
    position: relative;
    z-index: 1;
}

@keyframes ytw-pulse {
    0%, 100% {
        opacity: 0.25;
    }
    50% {
        opacity: 0.55;
    }
}

.ytw-title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff, #fee2e2, #fca5a5);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: ytw-gradientShift 3s ease-in-out infinite;
    letter-spacing: 0;
    line-height: 1.08;
}

@keyframes ytw-gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.ytw-subtitle {
    font-size: 1.25rem;
    color: #d4d4d8;
    font-weight: 500;
    margin-bottom: 2rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.ytw-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.ytw-feature-card {
    padding: 1.35rem;
    background: rgba(24, 24, 27, 0.72);
    backdrop-filter: blur(10px);
    border-radius: 0.9rem;
    border: 1px solid rgba(244, 63, 94, 0.22);
    transition: all 0.3s ease;
    text-align: center;
}

.ytw-feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
}

.ytw-feature-icon {
    font-size: 2.35rem;
    margin-bottom: 0.75rem;
    display: block;
}

.ytw-feature-text {
    font-size: 0.95rem;
    color: #f4f4f5;
    font-weight: 700;
}

/* Input Section */
.ytw-input-section {
    max-width: 100%;
    margin: 0 auto 2rem;
    padding: 2rem;
    background: rgba(24, 24, 27, 0.78);
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    border: 1px solid rgba(244, 63, 94, 0.24);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.38);
}

.ytw-input-wrapper {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.ytw-input-field {
    flex: 1 !important;
    min-width: 300px !important;
    padding: 1.15rem 1.35rem !important;
    background: rgba(9, 9, 11, 0.85) !important;
    border: 1px solid #52525b !important;
    border-radius: 0.85rem !important;
    color: white !important;
    font-size: 1.075rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.ytw-input-field:focus {
    outline: none;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.24);
    background: rgba(9, 9, 11, 0.96) !important;
}

.ytw-input-field::placeholder {
    color: rgba(161, 161, 170, 0.86);
}

.ytw-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    line-height: 1.2;
}

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

.ytw-btn:hover::before {
    left: 100%;
}

.ytw-btn:focus-visible {
    outline: 3px solid rgba(250, 204, 21, 0.72);
    outline-offset: 3px;
}

.ytw-btn-paste {
    background: linear-gradient(135deg, #3f3f46, #27272a);
    color: white;
    box-shadow: 0 8px 24px rgba(63, 63, 70, 0.36);
}

.ytw-btn-paste:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(63, 63, 70, 0.48);
}

.ytw-btn-search {
    background: linear-gradient(135deg, #ff0033, #dc2626);
    color: white;
    width: 100%;
    font-size: 1.125rem;
    padding: 1.2rem;
    box-shadow: 0 10px 28px rgba(255, 0, 51, 0.34);
}

.ytw-btn-search:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(255, 0, 51, 0.44);
}

.ytw-btn-search:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Styles */
.ytw-loading {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(24, 24, 27, 0.76);
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    margin: 2rem 0;
    border: 1px solid rgba(244, 63, 94, 0.24);
}

.ytw-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-left: 3px solid #ef4444;
    border-radius: 50%;
    animation: ytw-spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes ytw-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Channel Styles */
.ytw-channel-container {
    display: none;
    space-y: 2rem;
}

.ytw-channel-banner {
    width: 100%;
    height: clamp(200px, 30vw, 320px);
    background-size: cover;
    background-position: center;
    border-radius: 1.25rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

.ytw-channel-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.74));
}

.ytw-channel-header {
    background: rgba(24, 24, 27, 0.76);
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(244, 63, 94, 0.24);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.38);
}

.ytw-channel-main-info {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.ytw-channel-avatar {
    position: relative;
    flex-shrink: 0;
}

.ytw-channel-avatar img {
    width: clamp(96px, 15vw, 128px);
    height: clamp(96px, 15vw, 128px);
    border-radius: 50%;
    border: 4px solid rgba(239, 68, 68, 0.58);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.34);
    position: relative;
    z-index: 1;
}

.ytw-channel-avatar::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: linear-gradient(135deg, #ff0033, #dc2626);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.28;
}

.ytw-channel-details {
    flex: 1;
    min-width: 300px;
}

.ytw-channel-name {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    color: #ffffff;
    line-height: 1.15;
}

.ytw-verified-badge {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #16a34a, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.38);
    flex-shrink: 0;
}

.ytw-channel-handle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #d4d4d8;
    margin-bottom: 1rem;
    font-weight: 500;
}

.ytw-channel-description {
    background: rgba(9, 9, 11, 0.82);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    padding: 1rem !important;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(244, 63, 94, 0.2);
    line-height: 1.6 !important;
    color: #e4e4e7;
    width: 100% !important;
}

.ytw-channel-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.ytw-channel-link {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.34);
    color: #fecaca;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ytw-channel-link:hover {
    background: rgba(239, 68, 68, 0.23);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}

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

.ytw-stat-card {
    padding: 1.35rem;
    background: rgba(24, 24, 27, 0.72);
    backdrop-filter: blur(10px);
    border-radius: 0.9rem;
    border: 1px solid rgba(244, 63, 94, 0.24);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ytw-stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(239, 68, 68, 0.56);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}

.ytw-stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.ytw-stat-card:hover .ytw-stat-icon {
    transform: scale(1.08);
}

.ytw-stat-icon.users {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.ytw-stat-icon.views {
    background: linear-gradient(135deg, #16a34a, #14b8a6);
}

.ytw-stat-icon.calendar {
    background: linear-gradient(135deg, #f97316, #eab308);
}

.ytw-stat-icon.location {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.ytw-stat-value {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 800;
    color: #fafafa;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.ytw-stat-label {
    font-size: 0.875rem;
    color: #a1a1aa;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Videos Section */
.ytw-videos-section {
    background: rgba(24, 24, 27, 0.76);
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    padding: 2rem;
    border: 1px solid rgba(244, 63, 94, 0.24);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.38);
}

.ytw-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.ytw-section-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #ff0033, #dc2626);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytw-section-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: white;
}

.ytw-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.ytw-video-card {
    background: rgba(24, 24, 27, 0.72);
    backdrop-filter: blur(10px);
    border-radius: 0.9rem;
    overflow: hidden;
    border: 1px solid rgba(244, 63, 94, 0.24);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ytw-video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(239, 68, 68, 0.56);
}

.ytw-video-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.ytw-video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: all 0.3s ease;
    z-index: 1;
}

.ytw-video-card:hover .ytw-video-thumbnail::before {
    background: rgba(0, 0, 0, 0.34);
}

.ytw-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 4rem;
    height: 4rem;
    background: rgba(255, 0, 51, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 8px 25px rgba(255, 0, 51, 0.38);
}

.ytw-video-card:hover .ytw-play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
}

.ytw-play-button svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: white;
    margin-left: 2px;
}

.ytw-video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.82);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
}

.ytw-video-info {
    padding: 1rem;
}

.ytw-video-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ytw-video-card:hover .ytw-video-title {
    color: #fecaca;
}

.ytw-video-meta {
    color: #a1a1aa;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Modal Styles */
.ytw-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.ytw-modal-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.ytw-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ytw-modal-close:hover {
    background: rgba(239, 68, 68, 0.85);
    transform: scale(1.08);
}

.ytw-video-player {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Error Styles */
.ytw-error {
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(239, 68, 68, 0.42);
    color: #fecaca;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.ytw-error h3 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

/* Enhanced Download Modal Styles */
.ytw-download-modal-content {
    max-width: 900px;
    width: calc(100% - 2rem);
    max-height: 90vh;
    overflow-y: auto;
    background: rgba(24, 24, 27, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    border: 1px solid rgba(244, 63, 94, 0.24);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    margin: 2rem auto;
    position: relative;
}

.ytw-download-modal-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(244, 63, 94, 0.22);
}

.ytw-download-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.ytw-download-modal-thumbnail {
    width: 200px;
    max-width: 100%;
    height: auto;
    border-radius: 0.9rem;
    margin: 0 auto 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ytw-download-modal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(9, 9, 11, 0.78);
    border-radius: 1rem;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.ytw-download-info-item {
    text-align: center;
    min-width: 0;
}

.ytw-download-info-label {
    font-size: 0.875rem;
    color: #a1a1aa;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.ytw-download-info-value {
    font-size: 1rem;
    color: #fecaca;
    font-weight: 700;
    word-break: break-word;
}

.ytw-download-formats-section {
    margin-bottom: 2rem;
}

.ytw-download-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ytw-download-section-icon {
    width: 1.5rem;
    height: 1.5rem;
    background: linear-gradient(135deg, #ff0033, #dc2626);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.ytw-download-formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.ytw-download-format-card {
    background: rgba(24, 24, 27, 0.72);
    backdrop-filter: blur(10px);
    border-radius: 0.9rem;
    padding: 1.35rem;
    border: 1px solid rgba(244, 63, 94, 0.24);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ytw-download-format-card:hover {
    transform: translateY(-3px);
    border-color: rgba(239, 68, 68, 0.56);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.32);
}

.ytw-download-format-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ytw-download-format-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.ytw-download-format-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    flex-shrink: 0;
}

.ytw-download-format-icon.audio {
    background: linear-gradient(135deg, #f97316, #eab308);
}

.ytw-download-format-icon.video {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.ytw-download-format-label {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    overflow-wrap: anywhere;
}

.ytw-download-format-quality {
    font-size: 0.875rem;
    color: #fecaca;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.16);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.32);
    white-space: nowrap;
}

.ytw-btn-download {
    background: linear-gradient(135deg, #ff0033, #dc2626);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 25px rgba(255, 0, 51, 0.28);
}

.ytw-btn-download:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 0, 51, 0.38);
}

.ytw-btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Enhanced Loading Animation */
.ytw-download-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.ytw-download-loading-spinner {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 2rem;
    position: relative;
}

.ytw-download-loading-spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(239, 68, 68, 0.2);
    border-radius: 50%;
}

.ytw-download-loading-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid #ef4444;
    border-radius: 50%;
    animation: ytw-downloadSpin 1s linear infinite;
}

@keyframes ytw-downloadSpin {
    to {
        transform: rotate(360deg);
    }
}

.ytw-download-loading-text {
    font-size: 1.125rem;
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ytw-download-loading-subtext {
    font-size: 0.875rem;
    color: #a1a1aa;
}

.ytw-download-loading-dots {
    display: inline-flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.ytw-download-loading-dot {
    width: 0.375rem;
    height: 0.375rem;
    background: #ef4444;
    border-radius: 50%;
    animation: ytw-downloadDots 1.5s ease-in-out infinite;
}

.ytw-download-loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ytw-download-loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ytw-downloadDots {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Enhanced Progress Bar */
.ytw-download-progress-container {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(24, 24, 27, 0.72);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    border: 1px solid rgba(244, 63, 94, 0.22);
}

.ytw-download-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ytw-download-progress-title {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.ytw-download-progress-percentage {
    font-size: 1rem;
    font-weight: 800;
    color: #fecaca;
}

.ytw-download-progress-bar-container {
    width: 100%;
    height: 0.75rem;
    background: rgba(9, 9, 11, 0.82);
    border-radius: 0.375rem;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(244, 63, 94, 0.22);
}

.ytw-download-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff0033, #dc2626);
    border-radius: 0.375rem;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ytw-download-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
    animation: ytw-progressShimmer 2s ease-in-out infinite;
}

@keyframes ytw-progressShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.ytw-download-progress-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ytw-btn-cancel {
    background: linear-gradient(135deg, #71717a, #3f3f46);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 25px rgba(63, 63, 70, 0.3);
}

.ytw-btn-cancel:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(63, 63, 70, 0.4);
}

.ytw-download-complete {
    text-align: center;
    padding: 2rem;
    background: rgba(22, 163, 74, 0.16);
    border: 1px solid rgba(22, 163, 74, 0.4);
    border-radius: 1rem;
    margin-top: 1rem;
}

.ytw-download-complete-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #16a34a, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.ytw-download-complete-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #4ade80;
}

/* Utility Classes */
.ytw-hidden {
    display: none;
}

.ytw-flex {
    display: flex;
}

.ytw-items-center {
    align-items: center;
}

.ytw-gap-2 {
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .ytw-videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

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

    .ytw-download-formats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .ytw-container {
        padding: 1rem;
    }

    .ytw-header {
        margin-bottom: 2rem;
    }

    .ytw-header-content {
        margin: 28px 0;
    }

    .ytw-features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .ytw-input-section {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .ytw-input-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }

    .ytw-input-field {
        min-width: unset !important;
        font-size: 1rem !important;
        padding: 0.85rem 1rem !important;
        width: 100%;
    }

    .ytw-btn {
        width: 100%;
        padding: 0.9rem 1rem;
        white-space: normal;
    }

    .ytw-channel-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .ytw-channel-details {
        min-width: 0;
        width: 100%;
    }

    .ytw-channel-name {
        justify-content: center;
    }

    .ytw-channel-links {
        justify-content: center;
    }

    .ytw-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .ytw-stat-card {
        padding: 1rem;
    }

    .ytw-videos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ytw-channel-header,
    .ytw-videos-section {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .ytw-modal-content {
        top: 52%;
    }

    .ytw-download-modal-content {
        width: calc(100% - 1rem);
        margin: 1rem auto;
        padding: 1.25rem;
    }

    .ytw-download-formats-grid {
        grid-template-columns: 1fr;
    }

    .ytw-download-modal-info {
        grid-template-columns: 1fr;
    }

    .ytw-download-progress-container {
        padding: 1.25rem;
    }
}

@media (max-width: 600px) {
    .ytw-title {
        font-size: 2rem;
    }

    .ytw-subtitle {
        font-size: 1.05rem;
    }

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

    .ytw-channel-header {
        padding: 1.25rem;
    }

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

    .ytw-videos-section {
        padding: 1.25rem;
    }

    .ytw-videos-grid {
        grid-template-columns: 1fr;
    }

    .ytw-download-modal-content {
        padding: 1.25rem;
    }
}

@media (max-width: 400px) {
    .ytw-title {
        font-size: 1.75rem;
    }

    .ytw-subtitle {
        font-size: 1rem;
    }

    .ytw-features-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .ytw-feature-card {
        padding: 0.75rem;
    }

    .ytw-feature-icon {
        font-size: 1.5rem;
    }

    .ytw-feature-text {
        font-size: 0.75rem;
    }

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

    .ytw-download-format-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ytw-download-progress-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 375px) {
    .ytw-container {
        padding: 0.75rem;
    }

    .ytw-input-section {
        padding: 1rem;
    }

    .ytw-input-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ytw-input-field {
        min-width: unset !important;
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
        width: 100%;
    }

    .ytw-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .ytw-channel-main-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .ytw-channel-name {
        justify-content: center;
        font-size: 1.5rem;
    }

    .ytw-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .ytw-stat-card {
        padding: 1rem;
    }

    .ytw-videos-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ytw-channel-header,
    .ytw-videos-section {
        padding: 1rem;
    }

    .ytw-download-modal-content {
        margin: 0.75rem auto;
        padding: 1rem;
    }

    .ytw-download-formats-grid {
        grid-template-columns: 1fr;
    }

    .ytw-download-modal-info {
        grid-template-columns: 1fr;
    }

    .ytw-app-icon {
        width: 3rem;
        height: 3rem;
    }

    .ytw-app-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}