@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&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);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

.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;
    width: 100%;
}

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

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

.intro-text {
    max-width: 700px;
    margin: 0 auto 32px;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    width: 100%;
}

/* 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-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(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;
}

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

.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(42, 240, 234, 0.1);
    color: var(--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: 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-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);
    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-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

/* Profile Section */
.profile-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;
    animation: fadeInUp 0.8s ease-out;
    box-shadow: var(--shadow-lg);
}

.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: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 2px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
}

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

.fullscreen-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    cursor: pointer;
    transition: var(--transition);
    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: 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;
}

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

/* Enhanced Stats Section - Green 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: 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;
}

/* 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: 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-weight: 700;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
}

.videos-button:hover {
    transform: translateY(-2px);
    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);
}

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

.download-all-btn {
    padding: 12px 24px;
    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: 600;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

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

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

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

.video-card {
    background: var(--glass-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    height: 480px;
}

.video-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow:
        var(--shadow-lg),
        0 0 40px rgba(42, 240, 234, 0.2),
        0 0 60px rgba(255, 79, 163, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(122, 243, 238, 0.4);
}

.video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(42, 240, 234, 0.05) 0%,
            transparent 50%,
            rgba(255, 79, 163, 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: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
    box-shadow: 0 8px 25px rgba(42, 240, 234, 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:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(42, 240, 234, 0.5);
}

/* 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: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Video Info - Below Thumbnail */
.video-info {
    padding: 20px;
    background: var(--glass-bg);
    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.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(42, 240, 234, 0.1);
    color: var(--text-primary);
}

/* Video Modal - Enhanced */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 4, 13, 0.95);
    backdrop-filter: blur(25px);
    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 Button - Enhanced */
.close-modal {
    position: absolute;
    top: 10px;
    right: -30px;
    width: 48px;
    height: 48px;
    background: rgba(42, 240, 234, 0.2);
    border: 2px solid rgba(42, 240, 234, 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: var(--transition);
    z-index: 20;
    box-shadow: 0 4px 15px rgba(42, 240, 234, 0.3);
}

.close-modal:hover {
    background: rgba(42, 240, 234, 0.4);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(42, 240, 234, 0.8);
    box-shadow: 0 6px 20px rgba(42, 240, 234, 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: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    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: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    font-size: 24px;
    border: none;
}

.play-pause:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
}

/* 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: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    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: 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;
}

@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(34, 6, 87, 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(105, 176, 69, 0.2);
    border: 2px solid rgba(105, 176, 69, 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: 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-weight: 600;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    cursor: pointer;
    transition: var(--transition);
    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: 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;
}

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

.download-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary);
    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: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.cancel-download-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-download-btn:hover {
    background: rgba(42, 240, 234, 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);
        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);
    }
}

/* 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;
}
    
.paste-hint {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 991px) {
    .container_tiktok {
        max-width: 95%;
        padding: 40px 15px;
    }
}

@media (max-width: 767px) {
    .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%;
        min-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: center;
        text-align: center;
    }

    .download-all-btn {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: center;
    }
    
    .videos-button {
        width: 100%;
        justify-content: center;
    }

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

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

    .logo-text {
        font-size: 2.2rem;
    }

    .intro-text {
        font-size: 14px;
        padding: 0 20px;
    }
}

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

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

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

    .logo-text {
        font-size: 1.8rem;
    }

    .intro-text {
        font-size: 13px;
        padding: 0 15px;
    }
}

/* --- Codex CSS updates --- */
:root {
    --primary: #25f4ee;
    --primary-glow: rgba(37, 244, 238, 0.34);
    --accent: #ff0050;
    --accent-purple: #8f5cff;
    --success: #10B981;
    --error: #EF4444;
    --white: #ffffff;
    --gray-100: #f8fbff;
    --gray-300: #cbd5e1;
    --gray-500: #94a3b8;
    --gray-800: #1f2937;
    --gray-900: #07070b;
    --glass-bg: rgba(13, 16, 27, 0.82);
    --glass-border: rgba(37, 244, 238, 0.22);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.46);
    --shadow-xl: 0 30px 80px rgba(0, 0, 0, 0.58);
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(.23, 1.02, .67, 1.01);
    --text-primary: #ffffff;
    --text-secondary: #dbe7f3;
    --text-muted: #9fb1c7;
    --border-color: rgba(37, 244, 238, 0.22);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tiktok_body {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    color: var(--gray-100);
    line-height: 1.6;
    padding: 12px;
    background:
        radial-gradient(circle at 10% 12%, rgba(37, 244, 238, 0.28), transparent 34%),
        radial-gradient(circle at 88% 14%, rgba(255, 0, 80, 0.28), transparent 38%),
        radial-gradient(circle at 80% 82%, rgba(143, 92, 255, 0.18), transparent 42%),
        radial-gradient(circle at 18% 84%, rgba(255, 255, 255, 0.06), transparent 44%),
        linear-gradient(136deg, #050509 0%, #101421 32%, #171021 55%, #260a18 78%, #050509 100%);
    background-size: 190% 190%, 180% 180%, 220% 220%, 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(0, 0, 0, 0.38), rgba(16, 24, 39, 0.2)),
        radial-gradient(circle at 18% 18%, rgba(37, 244, 238, 0.08), transparent 52%),
        radial-gradient(circle at 82% 76%, rgba(255, 0, 80, 0.08), transparent 48%);
    opacity: 1;
}

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

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

.header {
    text-align: center;
    margin-bottom: 42px;
    animation: fadeInDown 1s ease-out;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin-bottom: 22px;
    flex-direction: column;
    width: 100%;
}

.logo-icon {
    width: 78px;
    height: 78px;
    background: linear-gradient(135deg, #25f4ee 0%, #111827 45%, #ff0050 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 900;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.32), 0 0 24px rgba(37, 244, 238, 0.32);
    position: relative;
    overflow: hidden;
    animation: pulse 2s ease-in-out infinite;
}

.logo-text {
    font-size: clamp(1.8rem, 5vw, 2.9rem);
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #25f4ee 35%, #ff0050 78%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0;
    font-family: 'Sora', sans-serif;
    display: block;
    width: 100%;
    text-align: center;
}

.intro-text {
    max-width: 700px;
    margin: 0 auto 32px;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    width: 100%;
}

.search-section,
.profile-section,
.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(22px, 5vw, 44px);
    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(18px, 4vw, 24px) !important;
    border: 1px solid rgba(37, 244, 238, 0.22) !important;
    border-radius: var(--radius-lg) !important;
    font-size: clamp(14px, 2.5vw, 16px) !important;
    font-weight: 500 !important;
    background: rgba(5, 7, 13, 0.74) !important;
    color: var(--white) !important;
    transition: var(--transition) !important;
}

.search-input:focus {
    outline: none !important;
    border-color: rgba(37, 244, 238, 0.78) !important;
    background: rgba(10, 15, 26, 0.9) !important;
    box-shadow: 0 0 0 4px rgba(37, 244, 238, 0.14), 0 10px 24px rgba(0, 0, 0, 0.28) !important;
}

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

.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(37, 244, 238, 0.12);
    color: var(--primary);
    transform: scale(1.1);
}

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

.search-button,
.videos-button,
.profile-modal-download {
    background: linear-gradient(135deg, #25f4ee 0%, #0f172a 45%, #ff0050 100%);
    color: white;
    border: 1px solid rgba(37, 244, 238, 0.36);
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), 0 0 18px rgba(37, 244, 238, 0.22);
}

.search-button {
    flex: 1;
    min-width: 200px;
    padding: clamp(16px, 3vw, 20px) clamp(24px, 5vw, 32px);
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    position: relative;
    overflow: hidden;
}

.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),
.videos-button:hover,
.profile-modal-download:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #25f4ee 0%, #18233a 35%, #ff0050 100%);
    box-shadow: 0 14px 32px rgba(255, 0, 80, 0.3), 0 0 24px rgba(37, 244, 238, 0.26);
    border-color: rgba(37, 244, 238, 0.48);
}

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

.search-again-btn,
.download-all-btn {
    background: rgba(15, 23, 42, 0.9);
    color: white;
    border: 1px solid rgba(37, 244, 238, 0.22);
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

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

.search-again-btn:hover,
.download-all-btn:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(37, 244, 238, 0.38);
}

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

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

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

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

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.34), 0 0 24px rgba(37, 244, 238, 0.32);
}

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

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

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

.profile-name {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #25f4ee 42%, #ff0050 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Sora', sans-serif;
    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.65;
    margin: 0 0 18px;
    overflow-wrap: anywhere;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 18px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
}

.stat-item {
    text-align: center;
    padding: 22px 18px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    background: rgba(15, 23, 42, 0.72);
}

.stat-item:nth-child(1) {
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.16) 0%, rgba(15, 23, 42, 0.62) 100%);
    box-shadow: 0 8px 32px rgba(37, 244, 238, 0.18);
    border-color: rgba(37, 244, 238, 0.3);
}

.stat-item:nth-child(2) {
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.16) 0%, rgba(15, 23, 42, 0.62) 100%);
    box-shadow: 0 8px 32px rgba(255, 0, 80, 0.18);
    border-color: rgba(255, 0, 80, 0.3);
}

.stat-item:nth-child(3) {
    background: linear-gradient(135deg, rgba(143, 92, 255, 0.16) 0%, rgba(15, 23, 42, 0.62) 100%);
    box-shadow: 0 8px 32px rgba(143, 92, 255, 0.18);
    border-color: rgba(143, 92, 255, 0.3);
}

.stat-item:nth-child(4) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(15, 23, 42, 0.62) 100%);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.28);
}

.stat-item::before {
    content: '';
    position: absolute;
    inset: 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(-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;
    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;
}

.results-container {
    width: 100%;
    min-width: 0;
}

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

.buttons_flex {
    flex-wrap: wrap;
    min-width: 0;
}

.videos-button {
    padding: 15px 28px;
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

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

.download-all-btn {
    padding: 12px 24px;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    white-space: nowrap;
}

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

.video-card {
    background: var(--glass-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    height: 480px;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(37, 244, 238, 0.18), 0 0 60px rgba(255, 0, 80, 0.13);
    border-color: rgba(37, 244, 238, 0.42);
}

.video-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.05) 0%, transparent 50%, rgba(255, 0, 80, 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.08);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 2;
    box-shadow: 0 8px 25px rgba(37, 244, 238, 0.38);
    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:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(37, 244, 238, 0.48);
}

.video-download-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: rgba(2, 6, 23, 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: 1px solid rgba(255, 255, 255, 0.22);
}

.video-download-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.video-info {
    padding: 20px;
    background: rgba(10, 15, 26, 0.92);
    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.08);
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 0;
}

.stat:hover {
    background: rgba(37, 244, 238, 0.12);
    color: var(--text-primary);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.96);
    backdrop-filter: blur(25px);
    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(37, 244, 238, 0.18);
    border: 2px solid rgba(37, 244, 238, 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: var(--transition);
    z-index: 20;
    box-shadow: 0 4px 15px rgba(37, 244, 238, 0.28);
}

.close-modal:hover {
    background: rgba(255, 0, 80, 0.35);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 0, 80, 0.75);
}

.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.22);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    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-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    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(37, 244, 238, 0.18);
    transform: scale(1.1);
}

.play-pause {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    font-size: 24px;
    border: none;
}

.play-pause:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
}

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

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

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

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

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

@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-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 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(37, 244, 238, 0.18);
    border: 2px solid rgba(37, 244, 238, 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.35);
    border-color: rgba(255, 0, 80, 0.75);
    transform: rotate(90deg) scale(1.08);
}

.profile-modal-download {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

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

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

.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.22);
    border-radius: 2px;
    overflow: hidden;
}

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

.cancel-download-btn {
    background: rgba(37, 244, 238, 0.16);
    border: 1px solid rgba(37, 244, 238, 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-download-btn:hover {
    background: rgba(255, 0, 80, 0.24);
    border-color: rgba(255, 0, 80, 0.48);
}

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

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

.fa-tiktok,
.fa-search,
.fa-paste,
.fa-exclamation-circle,
.fa-video,
.fa-download,
.fa-times,
.fa-volume-up,
.fa-play,
.fa-expand,
.fa-stop,
.fa-spinner,
.fa-spin,
.fa-heart,
.fa-comment,
.fa-share {
    line-height: 1;
}

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

@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(0, 0, 0, 0.32), 0 0 24px rgba(37, 244, 238, 0.32);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 32px rgba(255, 0, 80, 0.36);
    }
}

@media (max-width: 991px) {
    .container_tiktok {
        max-width: 1200px;
        padding: 34px 14px;
    }
}

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

    .container_tiktok {
        padding: 28px 10px;
    }

    .profile-section {
        padding: 24px 18px;
    }

    .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: 1fr;
        gap: 16px;
    }

    .video-card {
        height: 440px;
    }

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

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

    .search-button {
        width: 100%;
        min-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: stretch;
        text-align: center;
    }

    .buttons_flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .download-all-btn,
    .videos-button {
        width: 100%;
        justify-content: center;
    }

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

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

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

    .logo-text {
        font-size: 2.15rem;
    }

    .intro-text {
        font-size: 14px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .container_tiktok {
        padding: 22px 6px;
    }

    .search-section {
        padding: 20px 14px;
    }

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

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

    .video-card {
        height: 420px;
    }

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

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

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

    .stat {
        padding: 7px 4px;
    }

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

    .logo-text {
        font-size: 1.75rem;
    }

    .intro-text {
        font-size: 13px;
        padding: 0 6px;
    }

    .download-progress {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 14px;
        flex-wrap: wrap;
    }

    .profile-modal-download {
        left: 20px;
        right: 20px;
        justify-content: center;
    }
}