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

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

:root {
            --primary: #2af0ea;
            --primary-glow: rgba(42, 240, 234, 0.34);
            --accent: #ff4fa3;
            --accent-purple: #ff7a59;
            --success: #10B981;
            --error: #EF4444;
            --white: #fff7fb;
            --gray-100: #fdf2ff;
            --gray-300: #d9c7ef;
            --gray-500: #9f8dbd;
            --gray-800: #2e2142;
            --gray-900: #120917;
            --glass-bg: rgba(22, 12, 32, 0.78);
            --glass-border: rgba(122, 243, 238, 0.22);
            --shadow-lg: 0 24px 56px rgba(8, 4, 18, 0.56);
            --radius-md: 14px;
            --radius-lg: 18px;
            --radius-xl: 17px;
            --transition: all 0.3s cubic-bezier(.23, 1.02, .67, 1.01);
            --text-primary: #ffffff;
            --text-secondary: #d9c7ef;
            --text-muted: #9f8dbd;
            --border-color: rgba(122, 243, 238, 0.22);
        }
			
			.uicore-page-title .uicore h1.uicore-title {
	margin: .4em 0;
	display: none;
}

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .tiktok_body{
            font-family: 'Inter', sans-serif;
            position: relative;
            z-index: 0;
            min-height: 100vh;
            background:
                radial-gradient(circle at 10% 12%, rgba(42, 240, 234, 0.3), transparent 34%),
                radial-gradient(circle at 88% 14%, rgba(255, 79, 163, 0.34), transparent 38%),
                radial-gradient(circle at 80% 82%, rgba(255, 122, 89, 0.2), transparent 42%),
                radial-gradient(circle at 18% 84%, rgba(143, 92, 255, 0.22), transparent 44%),
                radial-gradient(circle at 52% 52%, rgba(255, 255, 255, 0.05), transparent 52%),
                linear-gradient(136deg, #09040d 0%, #150819 20%, #2a1033 42%, #3b0f2f 60%, #4a1638 78%, #120918 100%);
            background-size: 190% 190%, 180% 180%, 220% 220%, 210% 210%, 230% 230%, 240% 240%;
            animation: tiktok-aurora 16s ease-in-out infinite;
            color: var(--gray-100);
            line-height: 1.6;
            padding: 10px 10px;
            overflow-x: hidden;
            width: 100%;
        }
			
			

        .tiktok_body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            background:
                linear-gradient(160deg, rgba(4, 2, 10, 0.46), rgba(16, 8, 22, 0.22)),
                radial-gradient(circle at 18% 18%, rgba(42, 240, 234, 0.08), transparent 52%),
                radial-gradient(circle at 82% 76%, rgba(255, 79, 163, 0.08), transparent 48%),
                radial-gradient(circle at 55% 56%, rgba(255, 122, 89, 0.06), transparent 54%);
            opacity: 1;
        }

        .container_tiktok {
            max-width: 1400px;
            margin: 0 auto;
            padding: 32px 16px;
            position: relative;
            z-index: 1;
        }

        /* Header */
        .header {
            text-align: center;
            margin-bottom: 2.5rem;
            animation: fadeInDown 1s ease-out;
        }

        .logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1.5rem;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .logo-icon {
            width: 80px;
            height: 80px;
            background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff0050 75%, #ff4fa3 100%);
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            font-weight: 900;
            box-shadow: 0 25px 50px rgba(8, 4, 18, 0.3), 0 0 20px rgba(42, 240, 234, 0.3);
            position: relative;
            overflow: hidden;
            animation: pulse 2s ease-in-out infinite;
        }

        .logo-text {
            font-size: clamp(1.8rem, 5vw, 2.8rem);
            font-weight: 900;
            background: linear-gradient(135deg, #00f2ea 0%, #25f4ee 25%, #ff0050 75%, #ff4fa3 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
            letter-spacing: -1px;
            font-family: 'Sora', sans-serif;
            display: block;
            width: 100%;
            text-align: center;
        }

        .subtitle {
            font-size: clamp(0.9rem, 2.5vw, 1.1rem);
            color: var(--text-secondary);
            font-weight: 500;
            margin-top: 0.5rem;
            text-align: center;
            padding: 0 1rem;
        }

        /* Enhanced Search Section */
        .search-section {
            background: var(--glass-bg);
            backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
            -webkit-backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
            border: 2px solid var(--glass-border);
            padding: clamp(24px, 5vw, 48px);
            border-radius: var(--radius-xl);
            box-shadow: var(--shadow-lg);
            margin-bottom: 32px;
            animation: fadeInUp 1s ease-out 0.2s both;
        }

        .input-group {
            position: relative;
            margin-bottom: 1.5rem;
            z-index: 2;
        }

        .input-field {
            width: 100% !important;
            padding: clamp(16px, 3vw, 20px) clamp(20px, 4vw, 24px)  !important;
            border: 2px solid rgba(122, 243, 238, 0.18)  !important;
            border-radius: var(--radius-lg)  !important;
            font-size: clamp(14px, 2.5vw, 16px)  !important;
            font-weight: 500  !important;
            background: rgba(18, 9, 23, 0.68)  !important;
            color: var(--white)  !important;
            transition: var(--transition)  !important;
        }

        .input-field:focus {
            outline: none  !important;
            border-color: rgba(110, 238, 232, 0.78)  !important;
            background: rgba(22, 12, 32, 0.78)  !important;
            box-shadow: 0 0 0 4px rgba(42, 240, 234, 0.14), 0 10px 24px rgba(18, 8, 28, 0.28)  !important;
        }

        .input-field::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .input-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 1rem;
            font-size: clamp(0.8rem, 2vw, 0.9rem);
            color: var(--text-gray);
            z-index: 2;
            position: relative;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .paste-btn {
            background: linear-gradient(135deg, rgba(46, 33, 66, 0.9) 0%, rgba(62, 47, 79, 0.9) 100%);
            color: white;
            border: 1px solid rgba(122, 243, 238, 0.22);
            border-radius: var(--radius-md);
            font-weight: 700;
            font-size: clamp(0.85rem, 2.5vw, 1rem);
            cursor: pointer;
            transition: var(--transition);
            box-shadow: var(--shadow-lg);
            padding: 16px;
        }

        .paste-btn:hover {
            transform: translateY(-2px);
            background: linear-gradient(135deg, rgba(62, 47, 79, 0.95) 0%, rgba(86, 55, 80, 0.95) 100%);
            border-color: rgba(115, 242, 237, 0.32);
            box-shadow: var(--shadow-lg);
        }

        .action-buttons {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
            align-items: center;
            z-index: 2;
            position: relative;
        }

        .search-btn {
            flex: 1;
            min-width: 200px;
            padding: clamp(16px, 3vw, 20px) clamp(24px, 5vw, 32px);
            background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff0050 75%, #ff4fa3 100%);
            color: white;
            border: 1px solid rgba(122, 243, 238, 0.32);
            border-radius: var(--radius-md);
            font-size: clamp(0.85rem, 2.5vw, 1rem);
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-lg), 0 0 20px rgba(42, 240, 234, 0.3);
        }

        .search-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;
        }

        .search-btn:hover:not(:disabled)::before {
            left: 100%;
        }

        .search-btn:hover:not(:disabled) {
            transform: translateY(-3px);
            background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff4fa3 75%, #ff0050 100%);
            box-shadow: 0 12px 28px rgba(255, 79, 163, 0.35), 0 0 20px rgba(42, 240, 234, 0.25);
            border-color: rgba(122, 243, 238, 0.4);
        }

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

        .search-another-btn {
            background: linear-gradient(135deg, rgba(46, 33, 66, 0.9) 0%, rgba(62, 47, 79, 0.9) 100%);
            color: white;
            margin-top: 16px;
            width: 100%;
            padding: 16px;
            border: 1px solid rgba(122, 243, 238, 0.22);
            border-radius: var(--radius-md);
            font-weight: 700;
            font-size: clamp(0.85rem, 2.5vw, 1rem);
            cursor: pointer;
            transition: var(--transition);
            box-shadow: var(--shadow-lg);
        }

        .search-another-btn:hover {
            transform: translateY(-2px);
            background: linear-gradient(135deg, rgba(62, 47, 79, 0.95) 0%, rgba(86, 55, 80, 0.95) 100%);
            border-color: rgba(115, 242, 237, 0.32);
            box-shadow: var(--shadow-lg);
        }

        /* Loading Animation */
        .loading {
            display: none;
            justify-content: center;
            align-items: center;
            padding: 60px 40px;
            background: var(--glass-bg);
            backdrop-filter: blur(30px);
            border-radius: var(--radius-xl);
            margin: 32px 0;
            border: 1px solid var(--glass-border);
            box-shadow: var(--shadow-lg);
        }

        .loading-content {
            text-align: center;
        }

        .loading-animation {
            position: relative;
            width: 120px;
            height: 120px;
            margin: 0 auto 24px;
        }

        .loading-ring {
            position: absolute;
            border: 4px solid transparent;
            border-radius: 50%;
            animation: spin 2s linear infinite;
        }

        .loading-ring:nth-child(1) {
            width: 120px;
            height: 120px;
            border-top-color: var(--primary);
            animation-duration: 2s;
        }

        .loading-ring:nth-child(2) {
            width: 90px;
            height: 90px;
            top: 15px;
            left: 15px;
            border-right-color: var(--accent);
            animation-duration: 1.5s;
            animation-direction: reverse;
        }

        .loading-ring:nth-child(3) {
            width: 60px;
            height: 60px;
            top: 30px;
            left: 30px;
            border-bottom-color: var(--accent-purple);
            animation-duration: 1s;
        }

        .loading-dots {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-bottom: 16px;
        }

        .loading-dot {
            width: 12px;
            height: 12px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
            border-radius: 50%;
            animation: bounce 1.4s ease-in-out infinite both;
        }

        .loading-dot:nth-child(1) {
            animation-delay: -0.32s;
        }

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

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

        .loading-text {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .loading-subtext {
            font-size: 14px;
            color: var(--text-secondary);
        }

        /* Main Video Section */
        .video-section {
            display: none;
            animation: fadeInUp 0.8s ease-out;
            background: var(--glass-bg);
            backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
            -webkit-backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
            border: 2px solid var(--glass-border);
            border-radius: var(--radius-xl);
            padding: 32px;
            margin-bottom: 32px;
            box-shadow: var(--shadow-lg);
        }

        /* Author Info */
        .author-section {
            display: flex;
            align-items: center;
            gap: 24px;
            margin-bottom: 32px;
        }

        .author-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid transparent;
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
            padding: 2px;
            box-shadow: var(--shadow-lg);
            cursor: pointer;
            transition: var(--transition);
        }

        .author-avatar:hover {
            transform: scale(1.05);
            box-shadow: 0 25px 50px rgba(8, 4, 18, 0.3), 0 0 20px rgba(42, 240, 234, 0.3);
        }

        .author-details {
            flex: 1;
            min-width: 0;
        }

        .author-details h3 {
            font-size: 32px;
            font-weight: 800;
            margin-bottom: 8px;
            background: linear-gradient(135deg, #00f2ea 0%, #25f4ee 25%, #ff0050 75%, #ff4fa3 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-family: 'Sora', sans-serif;
        }

        .author-username {
            font-size: 18px;
            color: var(--text-secondary);
            margin-bottom: 16px;
        }

        /* Title */
        .video-title {
            font-size: clamp(1.2rem, 4vw, 1.6rem);
            font-weight: 800;
            margin-bottom: 1.5rem;
            line-height: 1.4;
            color: var(--text-light);
            width: 100%;
            text-align: center;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            word-break: break-word;
            padding: 0 1rem;
        }

        /* Stats Grid */
        .video-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 20px;
            padding: 0;
            background: transparent;
            border-radius: 0;
            backdrop-filter: none;
        }

        .stat-item {
            text-align: center;
            padding: 24px 20px;
            border-radius: var(--radius-lg);
            transition: var(--transition);
            position: relative;
            overflow: hidden;
            border: 1px solid var(--glass-border);
            backdrop-filter: blur(20px);
            background: var(--glass-bg);
        }

        .stat-item:nth-child(1) {
            background: linear-gradient(135deg, rgba(42, 240, 234, 0.15) 0%, rgba(42, 240, 234, 0.05) 100%);
            box-shadow: 0 8px 32px rgba(42, 240, 234, 0.2);
            border-color: rgba(42, 240, 234, 0.3);
        }

        .stat-item:nth-child(2) {
            background: linear-gradient(135deg, rgba(255, 79, 163, 0.15) 0%, rgba(255, 79, 163, 0.05) 100%);
            box-shadow: 0 8px 32px rgba(255, 79, 163, 0.2);
            border-color: rgba(255, 79, 163, 0.3);
        }

        .stat-item:nth-child(3) {
            background: linear-gradient(135deg, rgba(255, 122, 89, 0.15) 0%, rgba(255, 122, 89, 0.05) 100%);
            box-shadow: 0 8px 32px rgba(255, 122, 89, 0.2);
            border-color: rgba(255, 122, 89, 0.3);
        }

        .stat-item:nth-child(4) {
            background: linear-gradient(135deg, rgba(143, 92, 255, 0.15) 0%, rgba(143, 92, 255, 0.05) 100%);
            box-shadow: 0 8px 32px rgba(143, 92, 255, 0.2);
            border-color: rgba(143, 92, 255, 0.3);
        }

        .stat-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .stat-item:hover::before {
            opacity: 1;
        }

        .stat-item:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 16px 48px rgba(42, 240, 234, 0.3);
        }

        .stat-value {
            font-size: 28px;
            font-weight: 800;
            margin-bottom: 8px;
            color: #ffffff;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .stat-label {
            font-size: 14px;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 600;
            text-transform: capitalize;
            letter-spacing: 0.5px;
        }

        /* Video Streaming Area */
        .video-streaming-area {
            background: linear-gradient(135deg,
                    rgba(254, 44, 85, 0.08) 0%,
                    rgba(37, 244, 238, 0.08) 50%,
                    rgba(168, 85, 247, 0.08) 100%);
            border: 2px solid rgba(254, 44, 85, 0.3);
            border-radius: 24px;
            padding: clamp(1.5rem, 4vw, 2.5rem);
            margin-bottom: 1.5rem;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-lg), var(--shadow-pink);
            backdrop-filter: blur(15px);
        }

        .video-streaming-area::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-image:
                linear-gradient(rgba(254, 44, 85, 0.05) 1px, transparent 1px),
                linear-gradient(90deg, rgba(37, 244, 238, 0.05) 1px, transparent 1px);
            background-size: 30px 30px;
            opacity: 0.6;
            pointer-events: none;
            z-index: 1;
            animation: gridMove 12s linear infinite;
        }

        .video-streaming-area::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg,
                    transparent,
                    var(--tiktok-red),
                    var(--tiktok-blue),
                    var(--purple),
                    transparent);
            z-index: 2;
            animation: borderFlow 3s ease-in-out infinite;
        }

        .streaming-header {
            text-align: center;
            margin-bottom: 2rem;
            position: relative;
            z-index: 3;
        }

        .streaming-title {
            font-size: clamp(1rem, 3vw, 1.3rem);
            font-weight: 700;
            margin-bottom: 0.5rem;
            background: linear-gradient(135deg, var(--tiktok-red), var(--tiktok-blue));
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: titlePulse 4s ease-in-out infinite;
        }

        .streaming-subtitle {
            color: var(--text-gray);
            font-size: clamp(0.8rem, 2vw, 0.95rem);
            font-weight: 500;
        }

        /* Video Player */
        .video-player-wrapper {
            position: relative;
            width: 100%;
            max-width: min(380px, 90vw);
            margin: 0 auto;
            aspect-ratio: 9/16;
            border-radius: 24px;
            overflow: hidden;
            box-shadow: var(--shadow-xl), var(--shadow-pink);
            background: #000;
            z-index: 3;
            border: 2px solid rgba(254, 44, 85, 0.3);
        }

        .video-thumbnail {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 4;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .video-thumbnail:hover,
        .video-thumbnail:active {
            transform: scale(1.02);
        }

        .thumbnail-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 5;
            cursor: pointer;
            transition: all 0.4s ease;
            backdrop-filter: blur(2px);
        }

        .thumbnail-overlay:hover,
        .thumbnail-overlay:active {
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
        }

        .thumbnail-play-btn {
            width: clamp(60px, 15vw, 80px);
            height: clamp(60px, 15vw, 80px);
            background: linear-gradient(135deg, var(--tiktok-red), var(--pink));
            border: none;
            border-radius: 50%;
            color: white;
            font-size: clamp(1.5rem, 4vw, 2rem);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow-xl), var(--glow-tiktok);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            animation: playButtonPulse 3s ease-in-out infinite;
            border: 2px solid rgba(255, 255, 255, 0.2);
            min-height: 44px;
        }

        .thumbnail-play-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transform: translateX(-100%);
            transition: transform 0.6s;
        }

        .thumbnail-play-btn::hover,
        .thumbnail-play-btn::active {
            transform: translateX(100%);
        }

        .thumbnail-play-btn:hover,
        .thumbnail-play-btn:active {
            transform: scale(1.15);
            box-shadow: var(--shadow-xl), var(--glow-tiktok);
        }

        .video-player {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #000;
            position: relative;
            z-index: 2;
            display: none;
        }

        .video-player.playing {
            display: block;
        }

        .video-controls {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
            padding: clamp(1rem, 3vw, 1.5rem);
            transform: translateY(100%);
            transition: transform 0.4s ease;
            z-index: 10;
            backdrop-filter: blur(10px);
        }

        .video-player-wrapper:hover .video-controls,
        .video-controls.show {
            transform: translateY(0);
        }

        .progress-bar {
            width: 100%;
            height: clamp(4px, 1.5vw, 6px);
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
            margin-bottom: 0.5rem;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            min-height: 20px;
            /* Touch-friendly */
            display: flex;
            align-items: center;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--tiktok-red), var(--purple));
            border-radius: 3px;
            width: 0%;
            transition: width 0.1s linear;
            box-shadow: 0 0 10px rgba(254, 44, 85, 0.5);
        }

        /* Video Time Display */
        .video-time {
            display: flex;
            justify-content: space-between;
            font-size: clamp(0.7rem, 2vw, 0.8rem);
            color: var(--text-gray);
            margin-bottom: 1rem;
        }

        .control-buttons {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }

        .control-group {
            display: flex;
            align-items: center;
            gap: clamp(0.5rem, 2vw, 0.75rem);
            flex-wrap: wrap;
        }

        .control-btn {
            background: rgba(255, 255, 255, 0.15);
            border: none;
            color: white;
            width: clamp(40px, 10vw, 44px);
            height: clamp(40px, 10vw, 44px);
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            font-size: clamp(0.8rem, 2vw, 1rem);
            min-height: 44px;
            /* Touch-friendly */
            min-width: 44px;
        }

        .control-btn:hover,
        .control-btn:active {
            background: rgba(255, 255, 255, 0.25);
            transform: scale(1.1);
            box-shadow: var(--shadow);
        }

        .play-btn {
            width: clamp(50px, 12vw, 60px);
            height: clamp(50px, 12vw, 60px);
            background: linear-gradient(135deg, var(--tiktok-red), var(--purple));
            font-size: clamp(1rem, 3vw, 1.4rem);
            border: none;
            box-shadow: var(--shadow-lg), var(--glow-tiktok);
        }

        .volume-control {
            display: flex;
            align-items: center;
            gap: clamp(0.3rem, 1.5vw, 0.5rem);
            flex-wrap: wrap;
        }

        .volume-slider {
            width: clamp(60px, 15vw, 80px);
            height: clamp(4px, 1.5vw, 6px);
            background: rgba(255, 255, 255, 0.2);
            border-radius: 3px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            min-height: 20px;
            /* Touch-friendly */
            display: flex;
            align-items: center;
        }

        .volume-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--tiktok-blue), var(--green));
            border-radius: 3px;
            width: 100%;
            transition: width 0.1s ease;
            box-shadow: 0 0 8px rgba(37, 244, 238, 0.4);
        }

        /* Download Section */
        .download-section {
            background: var(--glass-bg);
            backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
            -webkit-backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
            border: 2px solid var(--glass-border);
            border-radius: var(--radius-xl);
            padding: 32px;
            margin-bottom: 32px;
            box-shadow: var(--shadow-lg);
        }

        .download-header {
            text-align: center;
            margin-bottom: clamp(0.8rem, 2.5vw, 1.2rem);
        }

        .download-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 8px;
            background: linear-gradient(135deg, #00f2ea 0%, #25f4ee 25%, #ff0050 75%, #ff4fa3 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-family: 'Sora', sans-serif;
            text-align: center;
        }

        .download-subtitle {
            color: var(--text-secondary);
            font-size: 16px;
            text-align: center;
            margin-bottom: 24px;
        }

        .download-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: clamp(0.8rem, 2vw, 1rem);
        }

        .download-btn {
            background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff0050 75%, #ff4fa3 100%);
            color: white;
            border: 1px solid rgba(122, 243, 238, 0.32);
            padding: 16px 24px;
            border-radius: var(--radius-md);
            font-weight: 700;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: var(--shadow-lg), 0 0 20px rgba(42, 240, 234, 0.3);
            position: relative;
            overflow: hidden;
        }

        .download-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;
        }

        .download-btn:hover:not(:disabled)::before {
            left: 100%;
        }

        .download-btn:hover:not(:disabled) {
            transform: translateY(-3px);
            background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff4fa3 75%, #ff0050 100%);
            box-shadow: 0 12px 28px rgba(255, 79, 163, 0.35), 0 0 20px rgba(42, 240, 234, 0.25);
            border-color: rgba(122, 243, 238, 0.4);
        }

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

        /* Audio Streaming Section */
        .audio-streaming {
            background: var(--glass-bg);
            backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
            -webkit-backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
            border: 2px solid var(--glass-border);
            border-radius: var(--radius-xl);
            padding: 32px;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-lg);
        }

        .audio-header {
            text-align: center;
            margin-bottom: clamp(0.8rem, 2.5vw, 1.2rem);
        }

        .audio-main-title {
            font-size: 24px;
            font-weight: 700;
            margin-bottom: 8px;
            background: linear-gradient(135deg, #00f2ea 0%, #25f4ee 25%, #ff0050 75%, #ff4fa3 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-family: 'Sora', sans-serif;
            text-align: center;
        }

        .audio-subtitle {
            color: var(--text-secondary);
            font-size: 16px;
            margin-bottom: 24px;
            text-align: center;
        }

        .audio-player-section {
            display: flex;
            align-items: center;
            gap: clamp(0.8rem, 3vw, 1.2rem);
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        /* Audio Icon - Left Side, Smaller */
        .audio-icon-wrapper {
            position: relative;
            flex-shrink: 0;
        }

        .audio-icon {
            width: 60px;
            height: 60px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            color: white;
            box-shadow: var(--shadow-lg);
            position: relative;
            z-index: 2;
            border: 2px solid rgba(122, 243, 238, 0.3);
        }

        .audio-wave {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            border: 1px solid rgba(42, 240, 234, 0.2);
            border-radius: 50%;
            animation: audioWaveRipple 2s ease-out infinite;
        }

        .audio-wave:nth-child(1) {
            width: 70px;
            height: 70px;
            animation-delay: 0s;
        }

        .audio-wave:nth-child(2) {
            width: 85px;
            height: 85px;
            animation-delay: 0.5s;
        }

        .audio-wave:nth-child(3) {
            width: 100px;
            height: 100px;
            animation-delay: 1s;
        }

        .audio-info {
            flex: 1;
            min-width: 0;
            text-align: center;
        }

        .audio-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
            word-break: break-word;
        }

        .audio-artist {
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 16px;
            word-break: break-word;
        }

        /* Audio Progress Bar */
        .audio-progress-container {
            width: 100%;
            margin-bottom: 1rem;
        }

        .audio-progress {
            height: clamp(6px, 2vw, 8px);
            background: rgba(139, 92, 246, 0.2);
            border-radius: 4px;
            position: relative;
            cursor: pointer;
            overflow: hidden;
            margin-bottom: 0.5rem;
            min-height: 20px;
            /* Touch-friendly */
            display: flex;
            align-items: center;
        }

        .audio-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--purple), var(--pink));
            border-radius: 4px;
            width: 0%;
            transition: width 0.1s ease;
            box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
        }

        .audio-time {
            display: flex;
            justify-content: space-between;
            font-size: clamp(0.7rem, 2vw, 0.8rem);
            color: var(--text-gray);
            margin-bottom: 1rem;
        }

        /* Audio Controls */
        .audio-controls {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: clamp(0.8rem, 3vw, 1rem);
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }

        .audio-play-btn {
            width: 56px;
            height: 56px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
            border: none;
            border-radius: 50%;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            box-shadow: var(--shadow-lg);
            font-size: 20px;
            flex-shrink: 0;
            border: 2px solid rgba(122, 243, 238, 0.3);
        }

        .audio-play-btn:hover,
        .audio-play-btn:active {
            transform: scale(1.1);
            box-shadow: 0 12px 28px rgba(255, 79, 163, 0.35), 0 0 20px rgba(42, 240, 234, 0.25);
        }

        /* Audio Volume Control */
        .audio-volume-control {
            display: flex;
            align-items: center;
            gap: clamp(0.5rem, 2vw, 0.75rem);
            flex-wrap: wrap;
        }

        .audio-volume-btn {
            background: rgba(139, 92, 246, 0.15);
            border: none;
            color: var(--purple-light);
            width: clamp(36px, 8vw, 40px);
            height: clamp(36px, 8vw, 40px);
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(139, 92, 246, 0.2);
            font-size: clamp(0.8rem, 2vw, 1rem);
            min-height: 44px;
            /* Touch-friendly */
            min-width: 44px;
        }

        .audio-volume-btn:hover,
        .audio-volume-btn:active {
            background: rgba(139, 92, 246, 0.25);
            transform: scale(1.1);
            box-shadow: var(--shadow);
        }

        .audio-volume-slider {
            width: clamp(60px, 15vw, 80px);
            height: clamp(4px, 1.5vw, 6px);
            background: rgba(139, 92, 246, 0.2);
            border-radius: 3px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            min-height: 20px;
            /* Touch-friendly */
            display: flex;
            align-items: center;
        }

        .audio-volume-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--purple), var(--pink));
            border-radius: 3px;
            width: 100%;
            transition: width 0.1s ease;
            box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
        }

        .download-audio-section {
            text-align: center;
        }

        .download-audio-btn {
            background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff0050 75%, #ff4fa3 100%);
            color: white;
            border: 1px solid rgba(122, 243, 238, 0.32);
            padding: 16px 24px;
            border-radius: var(--radius-md);
            font-weight: 700;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            box-shadow: var(--shadow-lg), 0 0 20px rgba(42, 240, 234, 0.3);
            position: relative;
            overflow: hidden;
            width: 100%;
            max-width: 300px;
            justify-content: center;
        }

        .download-audio-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;
        }

        .download-audio-btn:hover:not(:disabled)::before {
            left: 100%;
        }

        .download-audio-btn:hover:not(:disabled) {
            transform: translateY(-3px);
            background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff4fa3 75%, #ff0050 100%);
            box-shadow: 0 12px 28px rgba(255, 79, 163, 0.35), 0 0 20px rgba(42, 240, 234, 0.25);
            border-color: rgba(122, 243, 238, 0.4);
        }

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

        /* Download Progress */
        .download-progress {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--glass-bg);
            backdrop-filter: blur(20px);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-md);
            padding: 16px 20px;
            color: var(--text-primary);
            font-weight: 600;
            z-index: 1001;
            display: none;
            align-items: center;
            gap: 12px;
            box-shadow: var(--shadow-lg);
            min-width: 300px;
        }

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

        .progress-text {
            font-weight: 700;
            font-size: 14px;
            color: var(--text-primary);
            flex: 1;
            min-width: 0;
        }

        .cancel-btn {
            background: rgba(42, 240, 234, 0.2);
            border: 1px solid rgba(42, 240, 234, 0.4);
            color: var(--text-primary);
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .cancel-btn:hover {
            background: rgba(42, 240, 234, 0.4);
        }

        .progress-bar-container {
            width: 100%;
            height: clamp(6px, 2vw, 8px);
            background: rgba(139, 92, 246, 0.2);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--green), var(--tiktok-blue));
            border-radius: 4px;
            width: 0%;
            transition: width 0.3s ease;
            box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
            animation: progressGlow 3s ease-in-out infinite;
        }

        /* Error Message */
        .error-message {
            background: rgba(255, 79, 163, 0.1);
            border: 1px solid rgba(255, 79, 163, 0.2);
            color: var(--accent);
            padding: 16px 24px;
            border-radius: 12px;
            margin-top: 16px;
            display: none;
            align-items: center;
            gap: 12px;
            font-weight: 500;
        }

        /* Animations */
        @keyframes tiktok-aurora {
            0% { background-position: 0% 50%, 100% 50%, 50% 0%; }
            50% { background-position: 100% 50%, 0% 50%, 50% 100%; }
            100% { background-position: 0% 50%, 100% 50%, 50% 0%; }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

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

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

        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 25px 50px rgba(8, 4, 18, 0.3), 0 0 20px rgba(42, 240, 234, 0.3);
            }
            50% {
                transform: scale(1.05);
                box-shadow: 0 30px 60px rgba(8, 4, 18, 0.4), 0 0 30px rgba(42, 240, 234, 0.5);
            }
        }

        @keyframes bounce {
            0%, 80%, 100% {
                transform: scale(0);
            }
            40% {
                transform: scale(1);
            }
        }

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

        /* Enhanced Responsive Design */
        @media (max-width: 1024px) {
            .container {
                padding: clamp(1rem, 3vw, 1.5rem);
            }

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

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

            .action-buttons {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            .search-another-btn {
                width: 100%;
            }

            .audio-player-section {
                flex-direction: column;
                text-align: center;
                gap: 1rem;
            }

            .audio-controls {
                flex-direction: row;
                justify-content: center;
                gap: 1rem;
            }

            .audio-volume-control {
                justify-content: center;
            }

            .video-player-wrapper {
                max-width: min(320px, 85vw);
            }

            .logo-icon {
                width: 50px;
                height: 50px;
                font-size: 20px;
                margin-top: 60px;
            }

            .logo {
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 1.5rem;
                margin-bottom: 1rem;
                flex-wrap: wrap;
                flex-direction: column !important;
            }
        }

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

            .logo {
                flex-direction: column;
                gap: 1rem;
            }

            .logo-icon {
                width: 60px;
                height: 60px;
                font-size: 24px;
            }

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

            .author-section {
                flex-direction: column;
                text-align: center;
                gap: 1rem;
            }

            .download-progress {
                left: 1rem;
                right: 1rem;
                bottom: 1rem;
                min-width: auto;
            }

            .control-buttons {
                flex-direction: column;
                gap: 1rem;
                align-items: center;
            }

            .volume-control {
                order: 3;
                width: 100%;
                justify-content: center;
            }

            .audio-controls {
                flex-direction: column;
                gap: 1rem;
            }

            .audio-volume-control {
                width: 100%;
                justify-content: center;
            }

            .video-player-wrapper {
                max-width: min(300px, 80vw);
            }

            .video-controls {
                transform: translateY(0);
                position: relative;
                background: rgba(0, 0, 0, 0.8);
                margin-top: 1rem;
                border-radius: 12px;
            }

            .video-player-wrapper:hover .video-controls {
                transform: translateY(0);
            }

            .logo-icon {
                width: 50px;
                height: 50px;
                font-size: 20px;
                margin-top: 60px;
            }
        }

        @media (max-width: 480px) {
            .container {
                padding: 0.8rem;
            }

            .header {
                margin-bottom: 1.5rem;
            }

            .logo-icon {
                width: 50px;
                height: 50px;
                font-size: 20px;
            }

            .video-stats {
                grid-template-columns: 1fr;
                gap: 0.6rem;
            }

            .stat-item {
                min-height: 70px;
                padding: 0.8rem;
            }

            .stat-value {
                font-size: 1.3rem;
            }

            .audio-player-section {
                gap: 0.8rem;
            }

            .audio-icon {
                width: 40px;
                height: 40px;
                font-size: 1rem;
            }

            .audio-play-btn {
                width: 44px;
                height: 44px;
                font-size: 1rem;
            }

            .video-player-wrapper {
                max-width: min(280px, 75vw);
            }

            .thumbnail-play-btn {
                width: 60px;
                height: 60px;
                font-size: 1.5rem;
            }

            .download-progress {
                left: 0.5rem;
                right: 0.5rem;
                bottom: 0.5rem;
                padding: 1rem;
            }

            .progress-header {
                flex-direction: column;
                gap: 0.5rem;
                align-items: stretch;
            }

            .cancel-btn {
                align-self: center;
                min-width: 80px;
            }

            .input-field {
                font-size: 16px;
            }

            .control-btn,
            .audio-play-btn,
            .audio-volume-btn,
            .paste-btn,
            .search-btn,
            .download-btn,
            .download-audio-btn {
                min-height: 44px;
                min-width: 44px;
            }

            .progress-bar,
            .audio-progress,
            .volume-slider,
            .audio-volume-slider {
                min-height: 44px;
            }

            .logo-icon {
                width: 50px;
                height: 50px;
                font-size: 20px;
                margin-top: 60px;
            }
        }

        @media (max-width: 360px) {
            .container {
                padding: 0.5rem;
            }

            .search-section,
            .video-section,
            .download-section,
            .audio-streaming {
                padding: 1rem;
                border-radius: 16px;
            }

            .logo-text {
                font-size: 1.5rem;
                letter-spacing: -1px;
            }

            .subtitle {
                font-size: 0.8rem;
            }

            .video-player-wrapper {
                max-width: min(260px, 70vw);
            }

            .audio-wave:nth-child(1) {
                width: 45px;
                height: 45px;
            }

            .audio-wave:nth-child(2) {
                width: 55px;
                height: 55px;
            }

            .audio-wave:nth-child(3) {
                width: 65px;
                height: 65px;
            }

            .logo-icon {
                width: 50px;
                height: 50px;
                font-size: 20px;
                margin-top: 60px;
            }
        }

        @media (max-height: 500px) and (orientation: landscape) {
            .container {
                padding: 1rem;
            }

            .header {
                margin-bottom: 1rem;
            }

            .logo {
                flex-direction: row;
                gap: 1rem;
            }

            .logo-icon {
                width: 40px;
                height: 40px;
                font-size: 16px;
            }

            .video-player-wrapper {
                max-width: min(200px, 30vw);
            }

            .video-stats {
                grid-template-columns: repeat(5, 1fr);
                gap: 0.5rem;
            }

            .stat-item {
                min-height: 60px;
                padding: 0.5rem;
            }

            .stat-value {
                font-size: 1rem;
            }

            .stat-label {
                font-size: 0.6rem;
            }
        }

        @media (-webkit-min-device-pixel-ratio: 2),
        (min-resolution: 192dpi) {
            .logo-icon,
            .author-avatar,
            .audio-icon,
            .thumbnail-play-btn,
            .audio-play-btn {
                image-rendering: -webkit-optimize-contrast;
                image-rendering: crisp-edges;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }

            .video-player-wrapper,
            .search-section,
            .video-section,
            .download-section,
            .audio-streaming {
                animation: none !important;
            }
        }

        @media (prefers-contrast: high) {
            :root {
                --glass-dark: rgba(0, 0, 0, 0.9);
                --glass-purple: rgba(0, 0, 0, 0.9);
                --glass-blue: rgba(0, 0, 0, 0.9);
                --glass-border: rgba(255, 255, 255, 0.8);
                --shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
                --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.9);
                --shadow-xl: 0 16px 60px rgba(0, 0, 0, 1);
            }

            .input-field,
            .search-btn,
            .download-btn,
            .audio-play-btn {
                border: 2px solid var(--text-light);
            }
        }

        @media (prefers-color-scheme: dark) {
            body {
                background: linear-gradient(135deg,
                        #000000 0%,
                        var(--bg-primary) 25%,
                        var(--bg-secondary) 50%,
                        var(--card-purple) 75%,
                        var(--card-blue) 100%);
            }
        }

        @media print {
            body {
                background: white !important;
                color: black !important;
            }

            .container {
                max-width: none;
                padding: 0;
            }

            .video-player-wrapper,
            .download-section,
            .audio-streaming,
            .download-progress {
                display: none !important;
            }

            .search-section,
            .video-section {
                background: white !important;
                border: 1px solid black !important;
                box-shadow: none !important;
            }
        }
			
			
			/* Responsive Design for Small to Medium Devices */

@media (max-width: 992px) {
    .container_tiktok {
        padding: 2rem; /* Adjusted padding for slightly smaller screens */
    }

    .header {
        margin-bottom: 2rem;
    }

    .logo {
        flex-direction: row; /* Keep logo inline on wider tablets */
        gap: 1.5rem;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-top: 0; /* Reset margin for tablets */
    }

    .logo-text {
        font-size: clamp(2rem, 4vw, 3rem); /* Slightly smaller text for tablets */
    }

    .subtitle {
        font-size: clamp(0.9rem, 2vw, 1rem);
    }

    .search-section {
        padding: clamp(1.5rem, 3vw, 2rem);
    }

    .input-field {
        padding: clamp(0.8rem, 2.5vw, 1.2rem) clamp(1rem, 3vw, 1.5rem) !important;
        font-size: clamp(0.9rem, 2vw, 1rem) !important;
    }

    .input-actions {
        flex-direction: column; /* Stack paste button and action buttons */
        align-items: stretch;
        gap: 1rem;
    }

    .paste-btn {
        width: 100%;
        padding: clamp(0.7rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem);
    }

    .action-buttons {
        grid-template-columns: 1fr; /* Stack search buttons */
    }

    .search-btn,
    .search-another-btn {
        padding: clamp(0.9rem, 2.5vw, 1.2rem) clamp(1rem, 3vw, 2rem);
        font-size: clamp(0.9rem, 2vw, 1rem);
    }

    .loading {
        padding: clamp(1.5rem, 4vw, 2.5rem);
    }

    .loading-spinner {
        width: clamp(50px, 12vw, 80px);
        height: clamp(50px, 12vw, 80px);
    }

    .loading-text {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
    }

    .loading-subtext {
        font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    }

    .video-section {
        padding: clamp(1.5rem, 3vw, 2rem);
    }

    .author-section {
        flex-direction: row; /* Keep author info inline on tablets */
        text-align: left;
        padding: clamp(0.8rem, 2.5vw, 1.2rem);
        gap: 1rem;
    }

    .author-avatar {
        width: clamp(40px, 10vw, 50px);
        height: clamp(40px, 10vw, 50px);
    }

    .author-details h3 {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }

    .author-username {
        font-size: clamp(0.75rem, 2vw, 0.9rem);
    }

    .video-title {
        font-size: clamp(1.1rem, 3.5vw, 1.5rem);
        margin-bottom: 1.2rem;
    }

    .video-stats {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* More compact stats */
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .stat-item {
        padding: clamp(0.7rem, 2.5vw, 1rem);
        min-height: 70px;
    }

    .stat-value {
        font-size: clamp(1.1rem, 3vw, 1.4rem);
    }

    .stat-label {
        font-size: clamp(0.7rem, 1.8vw, 0.75rem);
    }

    .video-streaming-area {
        padding: clamp(1.2rem, 3vw, 2rem);
    }

    .streaming-header {
        margin-bottom: 1.5rem;
    }

    .streaming-title {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }

    .streaming-subtitle {
        font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    }

    .video-player-wrapper {
        max-width: min(350px, 80vw); /* Slightly smaller player on tablets */
        border-radius: 20px;
    }

    .thumbnail-play-btn {
        width: clamp(50px, 12vw, 70px);
        height: clamp(50px, 12vw, 70px);
        font-size: clamp(1.2rem, 3vw, 1.8rem);
    }

    .video-controls {
        padding: clamp(0.8rem, 2.5vw, 1.2rem);
    }

    .progress-bar {
        height: clamp(5px, 1.5vw, 6px);
        margin-bottom: 0.8rem;
    }

    .video-time {
        font-size: clamp(0.65rem, 1.8vw, 0.75rem);
        margin-bottom: 0.8rem;
    }

    .control-buttons {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .control-btn {
        width: clamp(38px, 9vw, 42px);
        height: clamp(38px, 9vw, 42px);
        font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    }

    .play-btn {
        width: clamp(48px, 11vw, 55px);
        height: clamp(48px, 11vw, 55px);
        font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    }

    .volume-slider {
        width: clamp(50px, 12vw, 70px);
        height: clamp(5px, 1.5vw, 6px);
    }

    .download-section {
        padding: clamp(0.9rem, 2.5vw, 1.2rem);
    }

    .download-header {
        margin-bottom: clamp(0.7rem, 2vw, 1rem);
    }

    .download-title {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }

    .download-subtitle {
        font-size: clamp(0.75rem, 1.8vw, 0.85rem);
    }

    .download-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Two columns on tablets */
        gap: 0.8rem;
    }

    .download-btn {
        padding: clamp(0.7rem, 2.5vw, 0.9rem) clamp(0.9rem, 3vw, 1.2rem);
        font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    }

    .audio-streaming {
        padding: clamp(0.9rem, 2.5vw, 1.2rem);
    }

    .audio-header {
        margin-bottom: clamp(0.7rem, 2vw, 1rem);
    }

    .audio-main-title {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }

    .audio-subtitle {
        font-size: clamp(0.75rem, 1.8vw, 0.85rem);
        margin-bottom: clamp(0.7rem, 2vw, 1rem);
    }

    .audio-icon {
        width: clamp(35px, 9vw, 45px);
        height: clamp(35px, 9vw, 45px);
        font-size: clamp(0.9rem, 2vw, 1.1rem);
    }

    .audio-wave:nth-child(1) {
        width: clamp(40px, 10vw, 50px);
        height: clamp(40px, 10vw, 50px);
    }

    .audio-wave:nth-child(2) {
        width: clamp(50px, 12vw, 60px);
        height: clamp(50px, 12vw, 60px);
    }

    .audio-wave:nth-child(3) {
        width: clamp(60px, 15vw, 70px);
        height: clamp(60px, 15vw, 70px);
    }

    .audio-title {
        font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    }

    .audio-artist {
        font-size: clamp(0.7rem, 1.8vw, 0.8rem);
    }

    .audio-progress {
        height: clamp(5px, 1.5vw, 7px);
        margin-bottom: 0.8rem;
    }

    .audio-time {
        font-size: clamp(0.65rem, 1.8vw, 0.75rem);
        margin-bottom: 0.8rem;
    }

    .audio-controls {
        gap: 0.8rem;
    }

    .audio-play-btn {
        width: clamp(40px, 9vw, 46px);
        height: clamp(40px, 9vw, 46px);
        font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    }

    .audio-volume-btn {
        width: clamp(34px, 8vw, 38px);
        height: clamp(34px, 8vw, 38px);
        font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    }

    .audio-volume-slider {
        width: clamp(50px, 12vw, 70px);
        height: clamp(5px, 1.5vw, 6px);
    }

    .download-audio-btn {
        padding: clamp(0.7rem, 2.5vw, 0.9rem) clamp(0.9rem, 3vw, 1.2rem);
        font-size: clamp(0.8rem, 1.8vw, 0.9rem);
        max-width: 250px;
    }

    .download-progress {
        min-width: min(280px, 90vw);
        padding: clamp(0.8rem, 2.5vw, 1.2rem);
    }

    .progress-text {
        font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    }

    .cancel-btn {
        padding: clamp(0.3rem, 1.2vw, 0.4rem) clamp(0.6rem, 1.8vw, 0.8rem);
        font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    }

    .progress-bar-container {
        height: clamp(5px, 1.5vw, 7px);
    }

    .error-message {
        padding: clamp(0.8rem, 2.5vw, 1rem) clamp(1rem, 3vw, 1.5rem);
        font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    }
}

@media (max-width: 768px) {
    .container_tiktok {
        padding: 1.5rem;
    }

    .header {
        margin-bottom: 1.8rem;
    }

    .logo {
        flex-direction: column; /* Stack logo elements vertically */
        gap: 1rem;
    }

    .logo-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
        margin-top: 0;
    }

    .logo-text {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
    }

    .subtitle {
        font-size: clamp(0.8rem, 2.5vw, 0.95rem);
        padding: 0 0.5rem;
    }

    .search-section {
        padding: clamp(1.2rem, 4vw, 1.8rem);
    }

    .input-field {
        padding: clamp(0.9rem, 3vw, 1.3rem) clamp(1rem, 4vw, 1.6rem) !important;
        font-size: clamp(0.85rem, 2.5vw, 0.95rem) !important;
    }

    .input-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .paste-btn {
        padding: clamp(0.6rem, 2.5vw, 0.9rem) clamp(0.8rem, 3vw, 1.2rem);
        font-size: clamp(0.75rem, 2vw, 0.85rem);
    }

    .search-btn,
    .search-another-btn {
        padding: clamp(0.8rem, 3vw, 1.1rem) clamp(1rem, 4vw, 1.6rem);
        font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    }

    .loading {
        padding: clamp(1.5rem, 5vw, 2.5rem);
    }

    .loading-spinner {
        width: clamp(40px, 10vw, 70px);
        height: clamp(40px, 10vw, 70px);
        margin-bottom: 1.5rem;
    }

    .loading-text {
        font-size: clamp(0.9rem, 2.8vw, 1.1rem);
    }

    .loading-subtext {
        font-size: clamp(0.75rem, 2.2vw, 0.85rem);
    }

    .video-section {
        padding: clamp(1.2rem, 4vw, 1.8rem);
    }

    .author-section {
        flex-direction: column; /* Stack author info vertically */
        text-align: center;
        gap: 0.8rem;
        padding: clamp(0.7rem, 2.5vw, 1rem);
    }

    .author-avatar {
        width: clamp(45px, 12vw, 55px);
        height: clamp(45px, 12vw, 55px);
    }

    .author-details h3 {
        font-size: clamp(0.9rem, 2.8vw, 1.1rem);
    }

    .author-username {
        font-size: clamp(0.7rem, 2.2vw, 0.85rem);
    }

    .video-title {
        font-size: clamp(1rem, 3.8vw, 1.4rem);
        margin-bottom: 1rem;
    }

    .video-stats {
        grid-template-columns: repeat(2, 1fr); /* Two columns for smaller tablets */
        gap: 0.6rem;
        margin-bottom: 1.2rem;
    }

    .stat-item {
        padding: clamp(0.6rem, 2vw, 0.9rem);
        min-height: 65px;
    }

    .stat-value {
        font-size: clamp(1rem, 3.5vw, 1.3rem);
    }

    .stat-label {
        font-size: clamp(0.65rem, 1.5vw, 0.7rem);
    }

    .video-streaming-area {
        padding: clamp(1rem, 3.5vw, 1.6rem);
    }

    .streaming-header {
        margin-bottom: 1.2rem;
    }

    .streaming-title {
        font-size: clamp(0.85rem, 2.5vw, 1rem);
    }

    .streaming-subtitle {
        font-size: clamp(0.7rem, 2vw, 0.8rem);
    }

    .video-player-wrapper {
        max-width: min(300px, 90vw);
        border-radius: 18px;
    }

    .thumbnail-play-btn {
        width: clamp(45px, 12vw, 60px);
        height: clamp(45px, 12vw, 60px);
        font-size: clamp(1.1rem, 3vw, 1.6rem);
    }

    .video-controls {
        transform: translateY(0); /* Always visible on smaller screens */
        position: relative;
        background: rgba(0, 0, 0, 0.8);
        margin-top: 1rem;
        border-radius: 12px;
        padding: clamp(0.7rem, 2.5vw, 1rem);
    }

    .video-player-wrapper:hover .video-controls {
        transform: translateY(0);
    }

    .progress-bar {
        height: clamp(4px, 1.2vw, 5px);
        margin-bottom: 0.7rem;
        min-height: 20px; /* Ensure touch-friendly */
    }

    .video-time {
        font-size: clamp(0.6rem, 1.5vw, 0.7rem);
        margin-bottom: 0.7rem;
    }

    .control-buttons {
        flex-direction: column; /* Stack video controls */
        gap: 0.7rem;
        align-items: center;
    }

    .control-group {
        width: 100%;
        justify-content: center;
        gap: 0.6rem;
    }

    .control-btn {
        width: clamp(36px, 10vw, 40px);
        height: clamp(36px, 10vw, 40px);
        font-size: clamp(0.7rem, 2vw, 0.85rem);
        min-width: 40px; /* Ensure touch-friendly */
        min-height: 40px;
    }

    .play-btn {
        width: clamp(44px, 12vw, 50px);
        height: clamp(44px, 12vw, 50px);
        font-size: clamp(0.9rem, 2.8vw, 1.2rem);
    }

    .volume-control {
        order: 3; /* Move volume to bottom */
        width: 100%;
        justify-content: center;
        gap: 0.4rem;
    }

    .volume-slider {
        width: clamp(50px, 15vw, 60px);
        height: clamp(4px, 1.2vw, 5px);
        min-height: 20px; /* Ensure touch-friendly */
    }

    .download-section {
        padding: clamp(0.8rem, 3vw, 1.1rem);
    }

    .download-header {
        margin-bottom: clamp(0.6rem, 1.8vw, 0.9rem);
    }

    .download-title {
        font-size: clamp(0.85rem, 2.5vw, 1.05rem);
    }

    .download-subtitle {
        font-size: clamp(0.7rem, 2vw, 0.8rem);
    }

    .download-grid {
        grid-template-columns: 1fr; /* Stack download buttons */
        gap: 0.7rem;
    }

    .download-btn {
        padding: clamp(0.7rem, 2.8vw, 0.9rem) clamp(0.9rem, 3.5vw, 1.4rem);
        font-size: clamp(0.75rem, 2.2vw, 0.85rem);
        min-height: 44px;
    }

    .audio-streaming {
        padding: clamp(0.8rem, 3vw, 1.1rem);
    }

    .audio-header {
        margin-bottom: clamp(0.6rem, 1.8vw, 0.9rem);
    }

    .audio-main-title {
        font-size: clamp(0.85rem, 2.5vw, 1.05rem);
    }

    .audio-subtitle {
        font-size: clamp(0.7rem, 2vw, 0.8rem);
        margin-bottom: clamp(0.6rem, 1.8vw, 0.9rem);
    }

    .audio-player-section {
        flex-direction: column; /* Stack audio player elements */
        gap: 0.7rem;
        margin-bottom: 1.2rem;
    }

    .audio-icon {
        width: clamp(30px, 8vw, 40px);
        height: clamp(30px, 8vw, 40px);
        font-size: clamp(0.8rem, 2vw, 1rem);
    }

    .audio-wave:nth-child(1) {
        width: clamp(35px, 9vw, 45px);
        height: clamp(35px, 9vw, 45px);
    }

    .audio-wave:nth-child(2) {
        width: clamp(45px, 11vw, 55px);
        height: clamp(45px, 11vw, 55px);
    }

    .audio-wave:nth-child(3) {
        width: clamp(55px, 14vw, 65px);
        height: clamp(55px, 14vw, 65px);
    }

    .audio-title {
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
    }

    .audio-artist {
        font-size: clamp(0.65rem, 2vw, 0.75rem);
    }

    .audio-progress {
        height: clamp(4px, 1.2vw, 6px);
        margin-bottom: 0.7rem;
        min-height: 20px; /* Ensure touch-friendly */
    }

    .audio-time {
        font-size: clamp(0.6rem, 1.5vw, 0.7rem);
        margin-bottom: 0.7rem;
    }

    .audio-controls {
        flex-direction: column;
        gap: 0.7rem;
        margin-bottom: 0.8rem;
    }

    .audio-play-btn {
        width: clamp(40px, 10vw, 44px);
        height: clamp(40px, 10vw, 44px);
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }

    .audio-volume-control {
        width: 100%;
        justify-content: center;
        gap: 0.4rem;
    }

    .audio-volume-btn {
        width: clamp(34px, 9vw, 38px);
        height: clamp(34px, 9vw, 38px);
        font-size: clamp(0.75rem, 2vw, 0.85rem);
    }

    .audio-volume-slider {
        width: clamp(50px, 15vw, 60px);
        height: clamp(4px, 1.2vw, 5px);
        min-height: 20px; /* Ensure touch-friendly */
    }

    .download-audio-btn {
        padding: clamp(0.7rem, 2.8vw, 0.9rem) clamp(0.9rem, 3.5vw, 1.4rem);
        font-size: clamp(0.75rem, 2.2vw, 0.85rem);
        max-width: 200px;
    }

    .download-progress {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        min-width: auto;
        padding: clamp(0.8rem, 2.5vw, 1.2rem);
        border-radius: 16px;
    }

    .progress-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .progress-text {
        font-size: clamp(0.7rem, 2vw, 0.85rem);
        text-align: center;
    }

    .cancel-btn {
        align-self: center;
        min-width: 70px;
        padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.5rem, 1.8vw, 0.7rem);
        font-size: clamp(0.6rem, 1.5vw, 0.7rem);
    }

    .error-message {
        padding: clamp(0.7rem, 2.5vw, 0.9rem) clamp(0.9rem, 3vw, 1.2rem);
        font-size: clamp(0.7rem, 2.2vw, 0.8rem);
    }
}

@media (max-width: 600px) {
    .container_tiktok {
        padding: 1.2rem;
    }

    .header {
        margin-bottom: 1.5rem;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .logo-text {
        font-size: clamp(1.6rem, 6vw, 2.5rem);
    }

    .subtitle {
        font-size: clamp(0.75rem, 2.8vw, 0.9rem);
    }

    .search-section {
        padding: clamp(1rem, 4.5vw, 1.6rem);
    }

    .input-field {
        padding: clamp(0.8rem, 3.5vw, 1.1rem) clamp(0.9rem, 4vw, 1.4rem) !important;
        font-size: clamp(0.8rem, 2.8vw, 0.9rem) !important;
    }

    .paste-btn,
    .search-btn,
    .search-another-btn {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
        padding: clamp(0.6rem, 3vw, 0.9rem) clamp(0.8rem, 4vw, 1.2rem);
        min-height: 44px; /* Ensure touch-friendly */
    }

    .loading-spinner {
        width: clamp(35px, 9vw, 60px);
        height: clamp(35px, 9vw, 60px);
        margin-bottom: 1.2rem;
    }

    .loading-text {
        font-size: clamp(0.85rem, 3vw, 1rem);
    }

    .loading-subtext {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .video-section {
        padding: clamp(1rem, 4.5vw, 1.6rem);
    }

    .author-section {
        gap: 0.7rem;
        padding: clamp(0.6rem, 2.2vw, 0.9rem);
    }

    .author-avatar {
        width: clamp(40px, 10vw, 50px);
        height: clamp(40px, 10vw, 50px);
    }

    .author-details h3 {
        font-size: clamp(0.85rem, 3vw, 1rem);
    }

    .author-username {
        font-size: clamp(0.65rem, 2.2vw, 0.75rem);
    }

    .video-title {
        font-size: clamp(0.9rem, 4.2vw, 1.3rem);
        margin-bottom: 0.8rem;
    }

    .video-stats {
        grid-template-columns: 1fr; /* Stack stats vertically */
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .stat-item {
        padding: clamp(0.5rem, 1.8vw, 0.8rem);
        min-height: 60px;
    }

    .stat-value {
        font-size: clamp(0.9rem, 3.8vw, 1.2rem);
    }

    .stat-label {
        font-size: clamp(0.6rem, 1.2vw, 0.65rem);
    }

    .video-streaming-area {
        padding: clamp(0.8rem, 4vw, 1.4rem);
    }

    .streaming-header {
        margin-bottom: 1rem;
    }

    .streaming-title {
        font-size: clamp(0.8rem, 2.8vw, 0.95rem);
    }

    .streaming-subtitle {
        font-size: clamp(0.65rem, 2.2vw, 0.75rem);
    }

    .video-player-wrapper {
        max-width: min(280px, 95vw);
        border-radius: 16px;
    }

    .thumbnail-play-btn {
        width: clamp(40px, 10vw, 50px);
        height: clamp(40px, 10vw, 50px);
        font-size: clamp(1rem, 2.5vw, 1.4rem);
    }

    .video-controls {
        padding: clamp(0.6rem, 2vw, 0.9rem);
        margin-top: 0.8rem;
    }

    .progress-bar {
        margin-bottom: 0.6rem;
    }

    .video-time {
        margin-bottom: 0.6rem;
    }

    .control-btn {
        width: clamp(34px, 9vw, 38px);
        height: clamp(34px, 9vw, 38px);
        font-size: clamp(0.65rem, 1.8vw, 0.8rem);
    }

    .play-btn {
        width: clamp(40px, 10vw, 46px);
        height: clamp(40px, 10vw, 46px);
        font-size: clamp(0.8rem, 2.5vw, 1.1rem);
    }

    .volume-slider {
        width: clamp(40px, 12vw, 50px);
    }

    .download-section {
        padding: clamp(0.7rem, 2.8vw, 1rem);
    }

    .download-header {
        margin-bottom: clamp(0.5rem, 1.5vw, 0.8rem);
    }

    .download-title {
        font-size: clamp(0.8rem, 2.8vw, 1rem);
    }

			}

/* --- Codex CSS updates --- */
:root {
    --primary: #25f4ee;
    --primary-glow: rgba(37, 244, 238, 0.34);
    --accent: #ff0050;
    --accent-purple: #7c3aed;
    --success: #10b981;
    --error: #ef4444;
    --white: #ffffff;
    --gray-100: #f8fbff;
    --gray-300: #c8d2e8;
    --gray-500: #8e9ab4;
    --gray-800: #182033;
    --gray-900: #090b12;
    --glass-bg: rgba(13, 18, 31, 0.82);
    --glass-border: rgba(37, 244, 238, 0.2);
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.38);
    --shadow-xl: 0 32px 80px rgba(0, 0, 0, 0.46);
    --shadow-pink: 0 20px 55px rgba(255, 0, 80, 0.18);
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 18px;
    --transition: all 0.3s cubic-bezier(.23, 1.02, .67, 1.01);
    --text-primary: #ffffff;
    --text-secondary: #d7deef;
    --text-muted: #9ba8c4;
    --text-gray: #b6c0d8;
    --text-light: #ffffff;
    --border-color: rgba(37, 244, 238, 0.2);
    --tiktok-red: #ff0050;
    --tiktok-blue: #25f4ee;
    --pink: #ff4fa3;
    --purple: #8b5cf6;
    --purple-light: #c4b5fd;
    --green: #10b981;
    --bg-primary: #090b12;
    --bg-secondary: #111827;
    --card-purple: #201134;
    --card-blue: #0b2633;
    --glow-tiktok: 0 0 24px rgba(37, 244, 238, 0.32);
}

.uicore-page-title .uicore h1.uicore-title {
    margin: .4em 0;
    display: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.tiktok_body {
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--gray-100);
    line-height: 1.6;
    padding: 24px 16px;
    background:
        radial-gradient(circle at 10% 12%, rgba(37, 244, 238, 0.22), transparent 32%),
        radial-gradient(circle at 88% 14%, rgba(255, 0, 80, 0.24), transparent 36%),
        radial-gradient(circle at 80% 82%, rgba(139, 92, 246, 0.18), transparent 40%),
        linear-gradient(135deg, #05070d 0%, #0b1020 28%, #15172b 56%, #220f24 78%, #070910 100%);
    background-size: 180% 180%, 190% 190%, 210% 210%, 240% 240%;
    animation: tiktok-aurora 16s ease-in-out infinite;
}

.tiktok_body::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(160deg, rgba(3, 5, 12, 0.62), rgba(11, 16, 32, 0.2)),
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.055), transparent 48%);
    pointer-events: none;
}

.container_tiktok,
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 0;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: fadeInDown 1s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.logo-icon {
    width: 78px;
    height: 78px;
    background: linear-gradient(135deg, var(--tiktok-blue) 0%, #10d7d2 34%, var(--tiktok-red) 72%, var(--pink) 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 900;
    color: var(--white);
    box-shadow: var(--shadow-lg), var(--glow-tiktok);
    position: relative;
    overflow: hidden;
    animation: pulse 2.5s ease-in-out infinite;
}

.logo-text {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--tiktok-blue) 0%, #f8fbff 38%, var(--tiktok-red) 76%, var(--pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
    font-family: 'Inter', sans-serif;
    display: block;
    width: 100%;
    text-align: center;
    line-height: 1.14;
}

.subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.5rem;
    text-align: center;
    padding: 0 1rem;
}

.search-section,
.video-section,
.download-section,
.audio-streaming,
.loading {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
    -webkit-backdrop-filter: blur(20px) saturate(145%) contrast(1.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.search-section {
    padding: clamp(24px, 5vw, 46px);
    margin-bottom: 32px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    z-index: 2;
}

.input-field {
    width: 100% !important;
    padding: clamp(16px, 3vw, 20px) clamp(18px, 4vw, 24px) !important;
    border: 1px solid rgba(37, 244, 238, 0.24) !important;
    border-radius: var(--radius-lg) !important;
    font-size: clamp(14px, 2.5vw, 16px) !important;
    font-weight: 500 !important;
    background: rgba(5, 8, 17, 0.7) !important;
    color: var(--white) !important;
    transition: var(--transition) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.input-field:focus {
    outline: none !important;
    border-color: rgba(37, 244, 238, 0.82) !important;
    background: rgba(11, 16, 32, 0.86) !important;
    box-shadow: 0 0 0 4px rgba(37, 244, 238, 0.14), 0 12px 28px rgba(0, 0, 0, 0.28) !important;
}

.input-field::placeholder {
    color: rgba(255, 255, 255, 0.52);
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: var(--text-gray);
    z-index: 2;
    position: relative;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.paste-btn,
.search-another-btn,
.cancel-btn {
    background: rgba(24, 32, 51, 0.88);
    color: var(--white);
    border: 1px solid rgba(37, 244, 238, 0.24);
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.paste-btn {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    padding: 14px 18px;
}

.paste-btn:hover,
.search-another-btn:hover,
.cancel-btn:hover {
    transform: translateY(-2px);
    background: rgba(35, 45, 69, 0.96);
    border-color: rgba(37, 244, 238, 0.44);
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
    z-index: 2;
    position: relative;
}

.search-btn,
.download-btn,
.download-audio-btn {
    background: linear-gradient(135deg, var(--tiktok-blue) 0%, #16c7d3 32%, var(--tiktok-red) 74%, var(--pink) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 22px rgba(37, 244, 238, 0.24);
}

.search-btn {
    min-width: 200px;
    padding: clamp(16px, 3vw, 20px) clamp(24px, 5vw, 32px);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

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

.search-btn:hover:not(:disabled)::before,
.download-btn:hover:not(:disabled)::before,
.download-audio-btn:hover:not(:disabled)::before {
    left: 100%;
}

.search-btn:hover:not(:disabled),
.download-btn:hover:not(:disabled),
.download-audio-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(255, 0, 80, 0.28), 0 0 22px rgba(37, 244, 238, 0.28);
}

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

.search-another-btn {
    margin-top: 16px;
    width: 100%;
    padding: 16px;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.loading {
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 60px 40px;
    margin: 32px 0;
    text-align: center;
}

.loading-content {
    text-align: center;
}

.loading-animation,
.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.loading-ring,
.spinner-ring {
    position: absolute;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

.loading-ring:nth-child(1),
.spinner-ring:nth-child(1) {
    width: 120px;
    height: 120px;
    border-top-color: var(--primary);
}

.loading-ring:nth-child(2),
.spinner-ring:nth-child(2) {
    width: 90px;
    height: 90px;
    top: 15px;
    left: 15px;
    border-right-color: var(--accent);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.loading-ring:nth-child(3),
.spinner-ring:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30px;
    left: 30px;
    border-bottom-color: var(--accent-purple);
    animation-duration: 1s;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 14px;
    color: var(--text-secondary);
}

.video-section {
    display: none;
    animation: fadeInUp 0.8s ease-out;
    padding: 32px;
    margin-bottom: 32px;
}

.video-title {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    color: var(--text-light);
    width: 100%;
    text-align: center;
    word-break: break-word;
    padding: 0 1rem;
}

.author-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
}

.author-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(37, 244, 238, 0.72);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 2px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
}

.author-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg), var(--glow-tiktok);
}

.author-details {
    flex: 1;
    min-width: 0;
}

.author-details h3 {
    font-size: clamp(1.35rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--white);
    word-break: break-word;
}

.author-username {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    word-break: break-word;
}

.video-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
    margin-bottom: 32px;
}

.stat-item {
    text-align: center;
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    background: rgba(13, 18, 31, 0.76);
}

.stat-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.15), rgba(37, 244, 238, 0.045));
    border-color: rgba(37, 244, 238, 0.32);
}

.stat-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.15), rgba(255, 0, 80, 0.045));
    border-color: rgba(255, 0, 80, 0.32);
}

.stat-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.045));
    border-color: rgba(139, 92, 246, 0.32);
}

.stat-item:nth-child(4) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0.045));
    border-color: rgba(16, 185, 129, 0.3);
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 58%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(37, 244, 238, 0.22);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
    text-transform: capitalize;
    letter-spacing: 0;
}

.video-streaming-area {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.08), rgba(37, 244, 238, 0.08) 52%, rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(37, 244, 238, 0.24);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-pink);
    backdrop-filter: blur(15px);
}

.video-streaming-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 244, 238, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 80, 0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.55;
    pointer-events: none;
    z-index: 1;
    animation: gridMove 12s linear infinite;
}

.video-streaming-area::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--tiktok-red), var(--tiktok-blue), var(--purple), transparent);
    z-index: 2;
    animation: borderFlow 3s ease-in-out infinite;
}

.streaming-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 3;
}

.streaming-title,
.download-title,
.audio-main-title {
    font-size: clamp(1rem, 3vw, 1.35rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--tiktok-blue), #ffffff 42%, var(--tiktok-red));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.streaming-subtitle,
.download-subtitle,
.audio-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.82rem, 2vw, 1rem);
    font-weight: 500;
    text-align: center;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    max-width: min(380px, 90vw);
    margin: 0 auto;
    aspect-ratio: 9/16;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-xl), var(--shadow-pink);
    background: #000;
    z-index: 3;
    border: 1px solid rgba(37, 244, 238, 0.3);
}

.video-thumbnail,
.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.video-thumbnail {
    position: absolute;
    inset: 0;
    z-index: 4;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-thumbnail:hover,
.video-thumbnail:active {
    transform: scale(1.02);
}

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(2px);
}

.thumbnail-overlay:hover,
.thumbnail-overlay:active {
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(4px);
}

.thumbnail-play-btn {
    width: clamp(60px, 15vw, 80px);
    height: clamp(60px, 15vw, 80px);
    background: linear-gradient(135deg, var(--tiktok-red), var(--pink));
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: white;
    font-size: clamp(1.5rem, 4vw, 2rem);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl), var(--glow-tiktok);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
}

.thumbnail-play-btn:hover,
.thumbnail-play-btn:active {
    transform: scale(1.12);
}

.video-player {
    object-fit: contain;
    position: relative;
    z-index: 2;
    display: none;
}

.video-player.playing {
    display: block;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
    padding: clamp(1rem, 3vw, 1.5rem);
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.video-player-wrapper:hover .video-controls,
.video-controls.show {
    transform: translateY(0);
}

.progress-bar,
.audio-progress,
.volume-slider,
.audio-volume-slider {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.progress-bar {
    width: 100%;
    height: clamp(4px, 1.5vw, 6px);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-bottom: 0.5rem;
    min-height: 20px;
}

.progress-fill,
.audio-progress-fill,
.volume-fill,
.audio-volume-fill,
.progress-bar-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.1s linear;
}

.progress-fill {
    background: linear-gradient(90deg, var(--tiktok-red), var(--purple));
    width: 0%;
    box-shadow: 0 0 10px rgba(255, 0, 80, 0.5);
}

.video-time,
.audio-time {
    display: flex;
    justify-content: space-between;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    color: var(--text-gray);
    margin-bottom: 1rem;
}

.control-buttons,
.control-group,
.volume-control,
.audio-controls,
.audio-volume-control {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 0.75rem);
    flex-wrap: wrap;
}

.control-buttons {
    justify-content: space-between;
    gap: 1rem;
}

.control-btn,
.audio-volume-btn {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    width: clamp(40px, 10vw, 44px);
    height: clamp(40px, 10vw, 44px);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: clamp(0.8rem, 2vw, 1rem);
    min-height: 44px;
    min-width: 44px;
}

.control-btn:hover,
.control-btn:active,
.audio-volume-btn:hover,
.audio-volume-btn:active {
    background: rgba(255, 255, 255, 0.24);
    transform: scale(1.08);
    box-shadow: var(--shadow);
}

.play-btn,
.audio-play-btn {
    background: linear-gradient(135deg, var(--tiktok-red), var(--purple));
    border: none;
    box-shadow: var(--shadow-lg), var(--glow-tiktok);
}

.play-btn {
    width: clamp(50px, 12vw, 60px);
    height: clamp(50px, 12vw, 60px);
    font-size: clamp(1rem, 3vw, 1.4rem);
}

.volume-slider,
.audio-volume-slider {
    width: clamp(60px, 15vw, 80px);
    height: clamp(4px, 1.5vw, 6px);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    min-height: 20px;
}

.volume-fill {
    background: linear-gradient(90deg, var(--tiktok-blue), var(--green));
    width: 100%;
    box-shadow: 0 0 8px rgba(37, 244, 238, 0.4);
}

.download-section {
    padding: 32px;
    margin-bottom: 32px;
}

.download-header,
.audio-header {
    text-align: center;
    margin-bottom: clamp(0.8rem, 2.5vw, 1.2rem);
}

.download-subtitle,
.audio-subtitle {
    margin-bottom: 24px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: clamp(0.8rem, 2vw, 1rem);
}

.download-btn {
    padding: 16px 24px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
}

.hd {
    border-color: rgba(255, 255, 255, 0.28);
}

.audio-streaming {
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.audio-player-section {
    display: flex;
    align-items: center;
    gap: clamp(0.8rem, 3vw, 1.2rem);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.audio-icon-wrapper {
    position: relative;
    flex-shrink: 0;
}

.audio-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
    border: 2px solid rgba(37, 244, 238, 0.3);
}

.audio-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(37, 244, 238, 0.25);
    border-radius: 50%;
    animation: audioWaveRipple 2s ease-out infinite;
}

.audio-wave:nth-child(1) {
    width: 70px;
    height: 70px;
    animation-delay: 0s;
}

.audio-wave:nth-child(2) {
    width: 85px;
    height: 85px;
    animation-delay: 0.5s;
}

.audio-wave:nth-child(3) {
    width: 100px;
    height: 100px;
    animation-delay: 1s;
}

.audio-info {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.audio-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    word-break: break-word;
}

.audio-artist {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    word-break: break-word;
}

.audio-progress-container {
    width: 100%;
    margin-bottom: 1rem;
}

.audio-progress {
    height: clamp(6px, 2vw, 8px);
    background: rgba(139, 92, 246, 0.22);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    min-height: 20px;
}

.audio-progress-fill {
    background: linear-gradient(90deg, var(--purple), var(--pink));
    width: 0%;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.audio-controls {
    justify-content: center;
    gap: clamp(0.8rem, 3vw, 1rem);
    margin-bottom: 1rem;
}

.audio-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 20px;
    flex-shrink: 0;
}

.audio-play-btn:hover,
.audio-play-btn:active {
    transform: scale(1.08);
    box-shadow: 0 14px 32px rgba(255, 0, 80, 0.28), 0 0 22px rgba(37, 244, 238, 0.28);
}

.audio-volume-btn {
    color: var(--purple-light);
    background: rgba(139, 92, 246, 0.16);
}

.audio-volume-slider {
    background: rgba(139, 92, 246, 0.22);
}

.audio-volume-fill {
    background: linear-gradient(90deg, var(--purple), var(--pink));
    width: 100%;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.download-audio-section {
    text-align: center;
}

.download-audio-btn {
    padding: 16px 24px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 300px;
    justify-content: center;
}

.download-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--text-primary);
    font-weight: 600;
    z-index: 1001;
    display: none;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: calc(100vw - 32px);
}

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

.progress-text {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
}

.cancel-btn {
    padding: 6px 12px;
    font-size: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.progress-bar-container {
    width: 100%;
    height: clamp(6px, 2vw, 8px);
    background: rgba(139, 92, 246, 0.22);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--green), var(--tiktok-blue));
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
    animation: progressGlow 3s ease-in-out infinite;
}

.error-message {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.36);
    color: #fecaca;
    padding: 16px 24px;
    border-radius: 12px;
    margin-top: 16px;
    display: none;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.fab,
.fas {
    display: inline-block;
    line-height: 1;
}

.fa-tiktok,
.fa-paste,
.fa-play-circle,
.fa-search,
.fa-exclamation-triangle,
.fa-play,
.fa-pause,
.fa-volume-up,
.fa-volume-mute,
.fa-expand,
.fa-compress,
.fa-download,
.fa-hd-video,
.fa-music {
    color: currentColor;
}

.views,
.likes,
.comments,
.shares,
.duration {
    color: var(--text-primary);
    font-weight: 800;
}

button:focus-visible,
.input-field:focus-visible {
    outline: 3px solid rgba(37, 244, 238, 0.38);
    outline-offset: 3px;
}

button,
input {
    max-width: 100%;
}

@keyframes tiktok-aurora {
    0% { background-position: 0% 50%, 100% 50%, 50% 0%, 0% 50%; }
    50% { background-position: 100% 50%, 0% 50%, 50% 100%, 100% 50%; }
    100% { background-position: 0% 50%, 100% 50%, 50% 0%, 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-lg), var(--glow-tiktok);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 30px 64px rgba(0, 0, 0, 0.42), 0 0 34px rgba(37, 244, 238, 0.46);
    }
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

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

@keyframes gridMove {
    from { background-position: 0 0; }
    to { background-position: 30px 30px; }
}

@keyframes borderFlow {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

@keyframes titlePulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.16); }
}

@keyframes playButtonPulse {
    0%, 100% { box-shadow: var(--shadow-xl), 0 0 18px rgba(255, 0, 80, 0.28); }
    50% { box-shadow: var(--shadow-xl), 0 0 34px rgba(37, 244, 238, 0.38); }
}

@keyframes audioWaveRipple {
    0% {
        opacity: 0.75;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.35);
    }
}

@keyframes progressGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

@media (max-width: 1024px) {
    .container_tiktok,
    .container {
        padding: 28px 0;
    }

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

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

    .audio-player-section {
        flex-direction: column;
        text-align: center;
    }

    .video-player-wrapper {
        max-width: min(340px, 85vw);
    }
}

@media (max-width: 768px) {
    .tiktok_body {
        padding: 18px 12px;
    }

    .container_tiktok,
    .container {
        padding: 22px 0;
    }

    .header {
        margin-bottom: 1.8rem;
    }

    .logo {
        flex-direction: column;
        gap: 1rem;
    }

    .logo-icon {
        width: 58px;
        height: 58px;
        font-size: 24px;
        margin-top: 0;
    }

    .search-section,
    .video-section,
    .download-section,
    .audio-streaming {
        padding: clamp(18px, 4.5vw, 28px);
    }

    .input-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .paste-btn,
    .search-btn,
    .search-another-btn,
    .download-btn,
    .download-audio-btn {
        width: 100%;
        min-height: 44px;
        white-space: normal;
    }

    .author-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .author-avatar {
        width: 72px;
        height: 72px;
    }

    .video-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }

    .stat-item {
        padding: 16px 12px;
    }

    .video-player-wrapper {
        max-width: min(320px, 92vw);
        border-radius: 18px;
    }

    .video-controls {
        transform: translateY(0);
        position: relative;
        background: rgba(0, 0, 0, 0.84);
        margin-top: 1rem;
        border-radius: 12px;
    }

    .control-buttons,
    .audio-controls {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .control-group,
    .volume-control,
    .audio-volume-control {
        width: 100%;
        justify-content: center;
    }

    .download-progress {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        min-width: auto;
    }

    .progress-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .cancel-btn {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .tiktok_body {
        padding: 14px 10px;
    }

    .container_tiktok,
    .container {
        padding: 18px 0;
    }

    .logo-text {
        font-size: clamp(1.55rem, 8vw, 2.1rem);
    }

    .subtitle {
        padding: 0;
    }

    .search-section,
    .video-section,
    .download-section,
    .audio-streaming,
    .video-streaming-area {
        border-radius: 14px;
        padding: 16px;
    }

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

    .stat-value {
        font-size: 1.35rem;
    }

    .video-title {
        padding: 0;
    }

    .video-player-wrapper {
        max-width: min(290px, 94vw);
        border-radius: 16px;
    }

    .thumbnail-play-btn {
        width: 56px;
        height: 56px;
        font-size: 1.35rem;
    }

    .audio-icon {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .audio-wave:nth-child(1) {
        width: 54px;
        height: 54px;
    }

    .audio-wave:nth-child(2) {
        width: 66px;
        height: 66px;
    }

    .audio-wave:nth-child(3) {
        width: 78px;
        height: 78px;
    }

    .progress-bar,
    .audio-progress,
    .volume-slider,
    .audio-volume-slider {
        min-height: 28px;
    }
}

@media (max-width: 360px) {
    .logo-text {
        font-size: 1.45rem;
    }

    .video-player-wrapper {
        max-width: min(260px, 92vw);
    }

    .control-btn,
    .audio-play-btn,
    .audio-volume-btn {
        min-width: 40px;
        min-height: 40px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .header {
        margin-bottom: 1rem;
    }

    .logo {
        flex-direction: row;
        gap: 1rem;
    }

    .logo-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .video-player-wrapper {
        max-width: min(220px, 34vw);
    }

    .video-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
}

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .logo-icon,
    .author-avatar,
    .audio-icon,
    .thumbnail-play-btn,
    .audio-play-btn {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .video-player-wrapper,
    .search-section,
    .video-section,
    .download-section,
    .audio-streaming {
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(0, 0, 0, 0.94);
        --glass-border: rgba(255, 255, 255, 0.85);
        --shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
        --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.9);
        --shadow-xl: 0 16px 60px rgba(0, 0, 0, 1);
    }

    .input-field,
    .search-btn,
    .download-btn,
    .audio-play-btn {
        border: 2px solid var(--text-light);
    }
}

@media print {
    .tiktok_body {
        background: white !important;
        color: black !important;
        padding: 0;
    }

    .container_tiktok,
    .container {
        max-width: none;
        padding: 0;
    }

    .video-player-wrapper,
    .download-section,
    .audio-streaming,
    .download-progress {
        display: none !important;
    }

    .search-section,
    .video-section {
        background: white !important;
        border: 1px solid black !important;
        box-shadow: none !important;
    }
}