@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.0.0/css/all.min.css");

:root {
            --primary-gradient: linear-gradient(135deg, #FF0050 0%, #00F2EA 100%);
            --secondary-gradient: linear-gradient(135deg, #69C9D0 0%, #EE1D52 100%);
            --accent-gradient: linear-gradient(135deg, #FF0050 0%, #FF4081 100%);
            --card-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --stats-gradient-1: linear-gradient(135deg, #2D1B69 0%, #11998e 100%);
            --stats-gradient-2: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%);
            --stats-gradient-3: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --stats-gradient-4: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            --glass-bg: rgba(255, 255, 255, 0.05);
            --glass-border: rgba(255, 255, 255, 0.1);
            --text-primary: #ffffff;
            --text-secondary: #cbd5e1;
            --text-muted: #94a3b8;
            --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
            --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
            --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
            --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.3);
            --shadow-neon: 0 0 20px rgba(255, 0, 80, 0.3);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', sans-serif;
        }

       .tiktok_body {
            background: linear-gradient(135deg, #0f172a 0%, #1c1917 50%, #0f172a 100%);
            min-height: 60vh;
            color: var(--text-primary);
            line-height: 1.6;
            position: relative;
            overflow-x: hidden;
        }

        .tiktok_body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background:
                radial-gradient(circle at 20% 30%, rgba(238, 29, 82, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(105, 201, 208, 0.15) 0%, transparent 50%);
            pointer-events: none;
            z-index: -1;
        }

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

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

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

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

        .logo-text {
            font-size: clamp(32px, 6vw, 60px);
            font-weight: 900;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
            letter-spacing: -2px;
        }

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

        .input-container {
            position: relative;
            margin-bottom: 20px;
        }

        .search-input {
            width: 100% !important;
            padding: clamp(16px, 3vw, 20px) clamp(20px, 4vw, 24px)  !important;
            border: 2px solid rgba(255, 255, 255, 0.2)  !important;
            border-radius: 16px  !important;
            font-size: clamp(14px, 2.5vw, 16px)  !important;
            font-weight: 500  !important;
            background: rgba(255, 255, 255, 0.1)  !important;
            color: var(--text-primary)  !important;
            transition: all 0.3s ease  !important;
        }

        .search-input:focus {
            outline: none  !important;
            border-color: #FF0050  !important;
            box-shadow: 0 0 0 4px rgba(255, 0, 80, 0.2)  !important;
        }

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

        .paste-hint {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            margin-top: 8px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .paste-icon {
            cursor: pointer;
            padding: 6px;
            border-radius: 6px;
            transition: all 0.3s ease;
            font-size: 16px;
        }

        .paste-icon:hover {
            background: rgba(255, 255, 255, 0.1);
            color: var(--text-primary);
            transform: scale(1.1);
        }

        .search-box {
            display: flex;
            gap: 16px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .search-button {
            flex: 1;
            min-width: 200px;
            padding: clamp(16px, 3vw, 20px) clamp(24px, 5vw, 32px);
            background: var(--primary-gradient);
            color: white;
            border: none;
            border-radius: 16px;
            font-size: clamp(14px, 2.5vw, 16px);
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-lg), var(--shadow-neon);
        }
			
			.container_tiktok {
	max-width: 1400px;
	margin: 0 auto;
	padding: 80px 16px;
	position: relative;
	z-index: 1;
}

        .search-button::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-button:hover:not(:disabled)::before {
            left: 100%;
        }

        .search-button:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: var(--shadow-xl), 0 0 30px rgba(255, 0, 80, 0.5);
        }

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

        .search-again-btn {
            background: var(--secondary-gradient);
            color: white;
            margin-top: 16px;
            width: 100%;
            padding: 16px;
            border: none;
            border-radius: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: var(--shadow-lg);
        }

        .search-again-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-xl);
        }

        /* Profile Section */
        .profile-section {
            background: var(--glass-bg);
            backdrop-filter: blur(30px);
            border: 1px solid var(--glass-border);
            border-radius: 24px;
            padding: 32px;
            margin-bottom: 32px;
            animation: fadeInUp 0.8s ease-out;
            box-shadow: var(--shadow-xl);
        }

        .profile-header {
            display: flex;
            gap: 24px;
            margin-bottom: 32px;
        }

        .profile-avatar-container {
            position: relative;
        }

        .profile-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid transparent;
            background: var(--primary-gradient);
            padding: 2px;
            box-shadow: var(--shadow-lg);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .profile-avatar:hover {
            transform: scale(1.05);
            box-shadow: var(--shadow-xl), var(--shadow-neon);
        }

        .fullscreen-icon {
            position: absolute;
            bottom: 5px;
            right: 5px;
            width: 24px;
            height: 24px;
            background: var(--primary-gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .fullscreen-icon:hover {
            transform: scale(1.1);
        }

        .profile-info {
            flex: 1;
        }

        .profile-name {
            font-size: 32px;
            font-weight: 800;
            margin-bottom: 8px;
            background: var(--primary-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

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

        /* Enhanced Stats Section - Darker Theme */
        .profile-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: 16px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
        }

        .stat-item:nth-child(1) {
            background: var(--stats-gradient-1);
            box-shadow: 0 8px 32px rgba(45, 27, 105, 0.4);
        }

        .stat-item:nth-child(2) {
            background: var(--stats-gradient-2);
            box-shadow: 0 8px 32px rgba(142, 45, 226, 0.4);
        }

        .stat-item:nth-child(3) {
            background: var(--stats-gradient-3);
            box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
        }

        .stat-item:nth-child(4) {
            background: var(--stats-gradient-4);
            box-shadow: 0 8px 32px rgba(240, 147, 251, 0.4);
        }

        .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(0, 0, 0, 0.4);
        }

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

        /* Videos Section Header */
        .videos-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 24px;
            padding: 20px 0;
        }

        .videos-button {
            padding: 16px 32px;
            background: var(--primary-gradient);
            color: white;
            border: none;
            border-radius: 16px;
            font-weight: 700;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: var(--shadow-md);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .videos-button:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        .videos-count {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-secondary);
        }

        .download-all-btn {
            padding: 12px 24px;
            background: var(--secondary-gradient);
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: var(--shadow-md);
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: 16px;
        }

        .download-all-btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

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

        /* Video Grid - Enhanced with Gradients */
        .video-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 24px;
        }

        .video-card {
            background: linear-gradient(135deg,
                    rgba(255, 0, 80, 0.1) 0%,
                    rgba(0, 242, 234, 0.1) 50%,
                    rgba(105, 201, 208, 0.1) 100%);
            border-radius: 20px;
            overflow: hidden;
            transition: all 0.3s ease;
            position: relative;
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow:
                var(--shadow-lg),
                0 0 20px rgba(255, 0, 80, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
            cursor: pointer;
            height: 480px;
        }

        .video-card:hover {
            transform: translateY(-15px) scale(1.02);
            box-shadow:
                var(--shadow-xl),
                0 0 40px rgba(255, 0, 80, 0.3),
                0 0 60px rgba(0, 242, 234, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 0, 80, 0.5);
        }

        .video-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg,
                    rgba(255, 0, 80, 0.05) 0%,
                    transparent 50%,
                    rgba(0, 242, 234, 0.05) 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
            z-index: 1;
        }

        .video-card:hover::before {
            opacity: 1;
        }

        .video-thumbnail-container {
            position: relative;
            width: 100%;
            height: 320px;
            overflow: hidden;
        }

        .video-thumbnail {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .video-card:hover .video-thumbnail {
            transform: scale(1.1);
        }

        /* Fixed Play Icon - Visible Triangle */
        .play-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 64px;
            height: 64px;
            background: rgba(255, 0, 80, 0.9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            z-index: 2;
            box-shadow: 0 8px 25px rgba(255, 0, 80, 0.4);
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        .play-overlay::after {
            content: '';
            width: 0;
            height: 0;
            border-left: 16px solid white;
            border-top: 12px solid transparent;
            border-bottom: 12px solid transparent;
            margin-left: 4px;
        }

        .video-card:hover .play-overlay {
            transform: translate(-50%, -50%) scale(1.2);
            background: rgba(255, 0, 80, 1);
            box-shadow: 0 12px 35px rgba(255, 0, 80, 0.6);
        }

        /* Always Visible Download Button */
        .video-download-btn {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 40px;
            height: 40px;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(10px);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 16px;
            transition: all 0.3s ease;
            opacity: 1;
            cursor: pointer;
            z-index: 10;
            border: 2px solid rgba(255, 255, 255, 0.2);
        }

        .video-download-btn:hover {
            background: var(--primary-gradient);
            transform: scale(1.1);
            border-color: rgba(255, 255, 255, 0.5);
        }

        /* Video Info - Below Thumbnail */
        .video-info {
            padding: 20px;
            background: rgba(0, 0, 0, 0.3);
            backdrop-filter: blur(10px);
            height: 160px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .video-title {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 12px;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            color: var(--text-primary);
            line-height: 1.4;
        }

        .video-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .stat {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 8px;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            transition: all 0.3s ease;
        }

        .stat:hover {
            background: rgba(255, 0, 80, 0.1);
            color: var(--text-primary);
        }

        /* Video Modal - Enhanced */
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(20px);
            z-index: 1000;
            display: none;
            animation: fadeIn 0.3s ease-out;
            padding: 20px;
        }

        .modal-content {
            position: relative;
            /* Make this parent for absolute positioning */
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            max-width: 500px;
            margin: 0 auto;
        }

        .modal-title {
            color: white;
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 16px;
            text-align: center;
            padding: 0 20px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.4;
        }

        .video-player-container {
            position: relative;
            width: 100%;
            aspect-ratio: 9/16;
            background: #000;
            border-radius: 20px;
            overflow: hidden;
            box-shadow: var(--shadow-xl);
        }

        .video-player {
            width: 100%;
            height: 100%;
            object-fit: contain;
        }

        /* Close Modal Button - Enhanced */

        .close-modal {
            position: absolute;
            top: 10px;
            right: -30px;
            /* <-- Pull more right OUTSIDE the video container */
            width: 48px;
            height: 48px;
            background: rgba(255, 0, 80, 0.2);
            border: 2px solid rgba(255, 0, 80, 0.5);
            border-radius: 50%;
            color: white;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            z-index: 20;
            box-shadow: 0 4px 15px rgba(255, 0, 80, 0.3);
        }

        .close-modal:hover {
            background: rgba(255, 0, 80, 0.4);
            transform: rotate(90deg) scale(1.1);
            border-color: rgba(255, 0, 80, 0.8);
            box-shadow: 0 6px 20px rgba(255, 0, 80, 0.5);
        }

        /* Video Controls */
        .video-controls {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 20px;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .progress-container {
            width: 100%;
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            cursor: pointer;
            position: relative;
        }

        .progress-bar {
            height: 100%;
            background: var(--primary-gradient);
            border-radius: 2px;
            position: relative;
            transition: width 0.1s linear;
        }

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

        .control-group {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .control-button {
            width: 44px;
            height: 44px;
            border: none;
            border-radius: 50%;
            background: var(--glass-bg);
            color: white;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            border: 1px solid var(--glass-border);
        }

        .control-button:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

        .play-pause {
            width: 56px;
            height: 56px;
            background: var(--primary-gradient);
            font-size: 24px;
            border: none;
        }

        .play-pause:hover {
            background: var(--secondary-gradient);
        }

        /* Volume Controls */
        .volume-controls {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .volume-slider {
            width: 80px;
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            position: relative;
            cursor: pointer;
        }

        .volume-fill {
            height: 100%;
            background: var(--primary-gradient);
            border-radius: 2px;
            transition: width 0.1s ease;
        }

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

        .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: #FF0050;
            animation-duration: 2s;
        }

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

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

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

        .loading-dot {
            width: 12px;
            height: 12px;
            background: var(--primary-gradient);
            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;
        }

        @keyframes bounce {

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

            40% {
                transform: scale(1);
            }
        }

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

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

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

        /* Profile Picture Modal */
        .profile-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(20px);
            z-index: 1000;
            display: none;
            animation: fadeIn 0.3s ease-out;
            padding: 20px;
        }

        .profile-modal-content {
            position: relative;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .profile-modal-image {
            max-width: 80%;
            max-height: 80%;
            border-radius: 20px;
            box-shadow: var(--shadow-xl);
        }

        .profile-modal-close {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 48px;
            height: 48px;
            background: rgba(255, 0, 80, 0.2);
            border: 2px solid rgba(255, 0, 80, 0.5);
            border-radius: 50%;
            color: white;
            font-size: 24px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        .profile-modal-download {
            position: absolute;
            bottom: 20px;
            right: 20px;
            padding: 12px 24px;
            background: var(--primary-gradient);
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .profile-modal-download:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

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

        .download-progress.show {
            display: flex;
        }

        .download-spinner {
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-top-color: #FF0050;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            flex-shrink: 0;
        }

        .download-info {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .download-text {
            font-size: 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .download-progress-bar {
            width: 100%;
            height: 4px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 2px;
            overflow: hidden;
        }

        .download-progress-fill {
            height: 100%;
            background: var(--primary-gradient);
            border-radius: 2px;
            width: 0%;
            transition: width 0.3s ease;
        }

        .cancel-download-btn {
            background: rgba(255, 0, 80, 0.2);
            border: 1px solid rgba(255, 0, 80, 0.4);
            color: white;
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .cancel-download-btn:hover {
            background: rgba(255, 0, 80, 0.4);
        }

        /* Animations */
        @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);
            }

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

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

        /* Responsive Design */
        @media (max-width: 768px) {
            .profile-header {
                flex-direction: column;
                align-items: center;
                text-align: center;
            }

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

            .video-grid {
                grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
                gap: 16px;
            }

            .video-card {
                height: 440px;
            }

            .video-thumbnail-container {
                height: 280px;
            }

            .search-box {
                flex-direction: column;
            }

            .search-button {
                width: 100%;
            }

            .control-buttons {
                flex-wrap: wrap;
                gap: 12px;
            }

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

            .close-modal {
                top: -50px;
                right: 10px;
            }

            .videos-section-header {
                flex-direction: column;
                gap: 12px;
                align-items: flex-start;
            }

            .download-all-btn {
                margin-left: 0;
                margin-top: 8px;
            }

            .download-progress {
                left: 20px;
                right: 20px;
                width: auto;
            }
					.logo-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	margin-bottom: 24px;
	flex-direction: column;
}
					.logo-icon {
	width: 60px;
	height: 60px;
	font-size: 28px;
	margin-top: 40px;
}
        }

        @media (max-width: 480px) {
            .profile-stats {
                grid-template-columns: 1fr;
            }

            .video-grid {
                grid-template-columns: 1fr;
            }
					.logo-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	margin-bottom: 24px;
	flex-direction: column;
}
					.logo-icon {
	width: 60px;
	height: 60px;
	font-size: 28px;
	margin-top: 40px;
}
				
					.videos-section-header {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between;
	margin-bottom: 24px;
	padding: 20px 0;
}
					.download-all-btn {
	padding: 12px 24px;
	background: var(--secondary-gradient);
	color: white;
	border: none;
	border-radius: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: var(--shadow-md);
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: 16px;
	width: 100%;
	font-size: 12px;
}
						.buttons_flex{
						flex-direction:column;
					}
        }

        @media (max-width: 500px) {
            .logo-icon {
                width: 60px;
                height: 60px;
                font-size: 28px;
            }

            .logo-text {
                font-size: clamp(24px, 5vw, 40px);
            }
					.logo-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	margin-bottom: 24px;
	flex-direction: column;
}
				
					.logo-icon {
	width: 60px;
	height: 60px;
	font-size: 28px;
	margin-top: 40px;
}
					.videos-section-header {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between;
	margin-bottom: 24px;
	padding: 20px 0;
}
			.download-all-btn {
	padding: 12px 24px;
	background: var(--secondary-gradient);
	color: white;
	border: none;
	border-radius: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: var(--shadow-md);
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: 16px;
	width: 100%;
	font-size: 13px;
}
					
					.buttons_flex{
						flex-direction:column;
					}
        }

/* --- Codex CSS updates --- */
:root {
    --primary-gradient: linear-gradient(135deg, #ff0050 0%, #00f2ea 100%);
    --secondary-gradient: linear-gradient(135deg, #00f2ea 0%, #ff0050 100%);
    --accent-gradient: linear-gradient(135deg, #ff0050 0%, #ff3b7f 100%);
    --card-gradient: linear-gradient(135deg, #111827 0%, #18181b 100%);
    --stats-gradient-1: linear-gradient(135deg, #ff0050 0%, #8b1040 100%);
    --stats-gradient-2: linear-gradient(135deg, #00b8b0 0%, #005f73 100%);
    --stats-gradient-3: linear-gradient(135deg, #111827 0%, #3b0764 100%);
    --stats-gradient-4: linear-gradient(135deg, #2dd4bf 0%, #ff0050 100%);
    --glass-bg: rgba(15, 23, 42, 0.78);
    --glass-border: rgba(255, 255, 255, 0.14);
    --text-primary: #ffffff;
    --text-secondary: #d8e2ea;
    --text-muted: #9fb0bf;
    --surface: rgba(9, 12, 20, 0.72);
    --surface-strong: rgba(15, 23, 42, 0.9);
    --focus-ring: rgba(0, 242, 234, 0.28);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.16);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.22);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.28);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.38);
    --shadow-neon: 0 0 22px rgba(0, 242, 234, 0.22), 0 0 28px rgba(255, 0, 80, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.tiktok_body {
    width: 100%;
    min-height: 60vh;
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 0, 80, 0.18) 0%, transparent 34%),
        radial-gradient(circle at 82% 24%, rgba(0, 242, 234, 0.16) 0%, transparent 32%),
        linear-gradient(135deg, #05070d 0%, #111827 46%, #05070d 100%);
}

.tiktok_body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(238, 29, 82, 0.16) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(105, 201, 208, 0.14) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container_tiktok {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: clamp(40px, 7vw, 80px) 16px;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: clamp(28px, 5vw, 48px);
    animation: fadeInDown 1s ease-out;
}

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

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 900;
    box-shadow: var(--shadow-xl), var(--shadow-neon);
    position: relative;
    overflow: hidden;
    animation: pulse 2s ease-in-out infinite;
    flex: 0 0 auto;
}

.logo-text {
    font-size: clamp(30px, 5vw, 58px);
    font-weight: 900;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    letter-spacing: 0;
    line-height: 1.08;
}

.search-section {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    padding: clamp(22px, 5vw, 44px);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 32px;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.input-container {
    position: relative;
    margin-bottom: 20px;
}

.search-input {
    width: 100% !important;
    max-width: 100% !important;
    padding: clamp(16px, 3vw, 20px) clamp(18px, 4vw, 24px) !important;
    border: 2px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 14px !important;
    font-size: clamp(14px, 2.5vw, 16px) !important;
    font-weight: 500 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease !important;
}

.search-input:focus {
    outline: none !important;
    border-color: #00f2ea !important;
    box-shadow: 0 0 0 4px var(--focus-ring) !important;
    background: rgba(255, 255, 255, 0.11) !important;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.paste-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.paste-icon {
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 16px;
}

.paste-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: scale(1.1);
}

.search-box {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-button {
    flex: 1;
    min-width: 200px;
    padding: clamp(16px, 3vw, 20px) clamp(24px, 5vw, 32px);
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: clamp(14px, 2.5vw, 16px);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg), var(--shadow-neon);
}

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

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

.search-button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(0, 242, 234, 0.34);
}

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

.search-again-btn {
    background: var(--secondary-gradient);
    color: white;
    margin-top: 16px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.search-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.results-container {
    width: 100%;
}

.profile-section {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: clamp(22px, 4vw, 32px);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out;
    box-shadow: var(--shadow-xl);
}

.profile-header {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.profile-avatar-container {
    position: relative;
    flex: 0 0 auto;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
    background: var(--primary-gradient);
    padding: 2px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl), var(--shadow-neon);
}

.fullscreen-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.fullscreen-icon:hover {
    transform: scale(1.1);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    overflow-wrap: anywhere;
}

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

.profile-bio {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px;
    overflow-wrap: anywhere;
}

.profile-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: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(20px);
}

.stat-item:nth-child(1) {
    background: var(--stats-gradient-1);
    box-shadow: 0 8px 32px rgba(255, 0, 80, 0.28);
}

.stat-item:nth-child(2) {
    background: var(--stats-gradient-2);
    box-shadow: 0 8px 32px rgba(0, 242, 234, 0.22);
}

.stat-item:nth-child(3) {
    background: var(--stats-gradient-3);
    box-shadow: 0 8px 32px rgba(59, 7, 100, 0.32);
}

.stat-item:nth-child(4) {
    background: var(--stats-gradient-4);
    box-shadow: 0 8px 32px rgba(255, 0, 80, 0.24);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%, rgba(255, 255, 255, 0.06) 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(0, 0, 0, 0.4);
}

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

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

.videos-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 0;
}

.buttons_flex {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.videos-button {
    padding: 16px 32px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.videos-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-neon);
}

.videos-count {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.download-all-btn {
    padding: 12px 24px;
    background: var(--secondary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: 16px;
    white-space: nowrap;
}

.download-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-neon);
}

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

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 24px;
}

.video-card {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.12) 0%, rgba(0, 242, 234, 0.1) 50%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 242, 234, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
    height: 480px;
}

.video-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: var(--shadow-xl), 0 0 36px rgba(255, 0, 80, 0.26), 0 0 48px rgba(0, 242, 234, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 242, 234, 0.42);
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.06) 0%, transparent 50%, rgba(0, 242, 234, 0.06) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.video-card:hover::before {
    opacity: 1;
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail {
    transform: scale(1.08);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 0, 80, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 8px 25px rgba(255, 0, 80, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.play-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 16px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.video-card:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.16);
    background: rgba(0, 242, 234, 0.95);
    box-shadow: 0 12px 35px rgba(0, 242, 234, 0.38);
}

.video-download-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(5, 7, 13, 0.82);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    opacity: 1;
    cursor: pointer;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.video-download-btn:hover {
    background: var(--primary-gradient);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.video-info {
    padding: 20px;
    background: rgba(5, 7, 13, 0.52);
    backdrop-filter: blur(10px);
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
    line-height: 1.4;
}

.video-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 0;
}

.stat:hover {
    background: rgba(0, 242, 234, 0.12);
    color: var(--text-primary);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 12, 0.96);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.modal-title {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    padding: 0 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: -30px;
    width: 48px;
    height: 48px;
    background: rgba(255, 0, 80, 0.22);
    border: 2px solid rgba(255, 0, 80, 0.5);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 4px 15px rgba(255, 0, 80, 0.3);
}

.close-modal:hover {
    background: rgba(255, 0, 80, 0.42);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 0, 80, 0.8);
    box-shadow: 0 6px 20px rgba(255, 0, 80, 0.5);
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.24);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
}

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

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.control-button:hover {
    background: rgba(0, 242, 234, 0.18);
    transform: scale(1.1);
}

.play-pause {
    width: 56px;
    height: 56px;
    background: var(--primary-gradient);
    font-size: 24px;
    border: none;
}

.play-pause:hover {
    background: var(--secondary-gradient);
}

.volume-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.24);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.volume-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 2px;
    transition: width 0.1s ease;
}

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

.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: #ff0050;
    animation-duration: 2s;
}

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

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

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

.loading-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-gradient);
    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);
}

.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 12, 0.96);
    backdrop-filter: blur(20px);
    z-index: 1000;
    display: none;
    animation: fadeIn 0.3s ease-out;
    padding: 20px;
}

.profile-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-modal-image {
    max-width: 80%;
    max-height: 80%;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
}

.profile-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 0, 80, 0.22);
    border: 2px solid rgba(255, 0, 80, 0.5);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.profile-modal-close:hover {
    background: rgba(255, 0, 80, 0.42);
    transform: rotate(90deg) scale(1.08);
}

.profile-modal-download {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-modal-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-neon);
}

.download-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface-strong);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    font-weight: 600;
    z-index: 1001;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: calc(100vw - 40px);
}

.download-progress.show {
    display: flex;
}

.download-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #00f2ea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.download-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.download-text {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.download-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.24);
    border-radius: 2px;
    overflow: hidden;
}

.download-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.cancel-download-btn {
    background: rgba(255, 0, 80, 0.22);
    border: 1px solid rgba(255, 0, 80, 0.42);
    color: white;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cancel-download-btn:hover {
    background: rgba(255, 0, 80, 0.42);
}

.error-message {
    background: rgba(255, 0, 80, 0.12);
    border: 1px solid rgba(255, 0, 80, 0.28);
    color: #ff7aa6;
    padding: 16px 24px;
    border-radius: 12px;
    margin-top: 16px;
    display: none;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.fab,
.fas,
.fa-comment,
.fa-download,
.fa-exclamation-circle,
.fa-expand,
.fa-heart,
.fa-paste,
.fa-play,
.fa-search,
.fa-share,
.fa-spin,
.fa-spinner,
.fa-stop,
.fa-tiktok,
.fa-times,
.fa-video,
.fa-volume-up {
    line-height: 1;
    display: inline-block;
    flex-shrink: 0;
}

.fa-spin,
.fa-spinner {
    animation: spin 1s linear infinite;
}

button:focus-visible,
.search-input:focus-visible,
.paste-icon:focus-visible,
.video-card:focus-visible {
    outline: 3px solid rgba(0, 242, 234, 0.5);
    outline-offset: 3px;
}

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

    40% {
        transform: scale(1);
    }
}

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

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

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

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

    .logo-container {
        flex-direction: column;
        gap: 18px;
        margin-bottom: 20px;
    }

    .logo-icon {
        width: 64px;
        height: 64px;
        font-size: 30px;
    }

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

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

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
        gap: 16px;
    }

    .video-card {
        height: 440px;
    }

    .video-thumbnail-container {
        height: 280px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-button {
        width: 100%;
        min-width: 0;
    }

    .control-buttons {
        flex-wrap: wrap;
        gap: 12px;
    }

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

    .close-modal {
        top: -50px;
        right: 10px;
    }

    .videos-section-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .buttons_flex {
        width: 100%;
        justify-content: stretch;
    }

    .videos-button,
    .download-all-btn {
        flex: 1 1 180px;
        width: auto;
        margin-left: 0;
    }

    .videos-count {
        white-space: normal;
    }

    .download-progress {
        left: 20px;
        right: 20px;
        width: auto;
        min-width: 0;
    }
}

@media (max-width: 500px) {
    .container_tiktok {
        padding: 40px 12px;
    }

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

    .logo-text {
        font-size: clamp(25px, 9vw, 40px);
    }

    .search-section,
    .profile-section {
        border-radius: 16px;
    }

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

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

    .videos-section-header {
        display: flex !important;
        align-items: stretch !important;
        justify-content: space-between;
        margin-bottom: 24px;
        padding: 20px 0;
    }

    .buttons_flex {
        flex-direction: column;
    }

    .videos-button,
    .download-all-btn {
        width: 100%;
        font-size: 13px;
    }

    .download-all-btn {
        padding: 12px 20px;
    }

    .profile-modal-image {
        max-width: 94%;
        max-height: 76%;
    }

    .profile-modal-download {
        right: 50%;
        transform: translateX(50%);
        width: calc(100% - 40px);
        justify-content: center;
    }

    .profile-modal-download:hover {
        transform: translateX(50%) translateY(-2px);
    }

    .download-progress {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .cancel-download-btn {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 380px) {
    .video-card {
        height: 410px;
    }

    .video-thumbnail-container {
        height: 250px;
    }

    .video-info {
        height: 160px;
        padding: 16px;
    }

    .video-stats {
        gap: 6px;
        font-size: 11px;
    }

    .stat {
        padding: 7px 4px;
    }

    .control-group {
        gap: 8px;
    }

    .control-button {
        width: 40px;
        height: 40px;
    }

    .play-pause {
        width: 50px;
        height: 50px;
    }
}