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

:root {
    --primary: #ff0050;
    --secondary: #00f2ea;
    --accent: #ff4081;
    --purple: #8b5cf6;
    --orange: #ff8800;
    --green: #00ff88;
    --blue: #0ea5e9;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: rgba(30, 41, 59, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #475569;
    --border-light: #64748b;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.8);
    --glow-primary: 0 0 30px rgba(255, 0, 80, 0.3);
    --glow-secondary: 0 0 30px rgba(0, 242, 234, 0.3);
    --gradient-primary: linear-gradient(135deg, #ff0050, #ff4081, #ff6b9d);
    --gradient-secondary: linear-gradient(135deg, #00f2ea, #00d4aa, #00ff88);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #a855f7, #c084fc);
    --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.tiktok_body {
    font-family: 'Inter', sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.tiktok_body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 0, 80, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 242, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container_tiktok{
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    box-shadow: var(--shadow-lg), var(--glow-primary);
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: logoShine 3s ease-in-out infinite;
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.logo-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.25rem;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    max-width: 700px;
    width: 100%;
}

.search-form {
    display: flex;
    gap: 1rem;
    position: relative;
    width: 100%;
}

.search-input {
    flex: 1 !important;
    padding: 1rem 1.5rem !important;
    background: rgba(30, 41, 59, 0.9) !important;
    backdrop-filter: blur(15px) !important;
    border: 2px solid var(--border) !important;
    border-radius: 16px !important;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    outline: none !important;
    transition: all 0.3s ease !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(255, 0, 80, 0.1), var(--glow-primary), inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px) !important;
    background: rgba(30, 41, 59, 0.95) !important;
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.search-input:not(:placeholder-shown) {
    background: rgba(30, 41, 59, 0.95);
    border-color: var(--border-light);
    font-weight: 600;
}

.search-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

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

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

.search-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl), var(--glow-primary);
}

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

.search-another-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-another-btn:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 1.5rem;
    min-height: 0;
}

/* Video Section */
.video-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.video-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-secondary);
}

/* Video Stats Bar */
.video-stats-bar {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(255, 0, 80, 0.1), rgba(139, 92, 246, 0.1));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.video-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-stat-item i {
    font-size: 1rem;
}

.video-stat-item .fa-eye {
    color: #ec4899;
}

.video-stat-item .fa-heart {
    color: #ef4444;
}

.video-stat-item .fa-comment {
    color: #3b82f6;
}

.video-stat-item .fa-share {
    color: #10b981;
}

.video-stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.video-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.video-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.video-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 242, 234, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(0, 242, 234, 0.2);
    box-shadow: var(--shadow);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary);
    box-shadow: var(--shadow);
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
}

.author-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-username {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.author-verified {
    color: var(--blue);
    font-size: 0.9rem;
}

.video-player-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    position: relative;
}

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

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

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-overlay:hover {
    background: rgba(0, 0, 0, 0.6);
}

.play-button {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl), var(--glow-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.play-button:hover::before {
    transform: translateX(100%);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl), var(--glow-primary);
}

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

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

/* Video Controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 10;
}

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

.progress-container {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 0, 80, 0.5);
}

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

.control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.play-control-btn {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    font-size: 1.2rem;
    border: none;
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.volume-fill {
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 3px;
    width: 100%;
    transition: width 0.1s ease;
    box-shadow: 0 0 8px rgba(0, 242, 234, 0.4);
}

.time-display {
    font-size: 0.8rem;
    color: white;
    font-weight: 500;
}

/* Loading States */
.loading-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Comments Section */
.comments-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.comments-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-purple);
}

.comments-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(255, 64, 129, 0.1));
}

.comments-title {
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.comments-count {
    background: var(--gradient-purple);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--shadow);
    min-width: 40px;
    text-align: center;
}

.comments-container {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    max-height: calc(100vh - 300px);
    min-height: 400px;
    position: relative;
}

/* Always visible scrollbar */
.comments-container::-webkit-scrollbar {
    width: 12px;
}

.comments-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 6px;
    margin: 4px;
}

.comments-container::-webkit-scrollbar-thumb {
    background: var(--gradient-purple);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

.comments-container::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

/* Firefox scrollbar */
.comments-container {
    scrollbar-width: auto;
    scrollbar-color: var(--purple) var(--bg-secondary);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-purple);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    align-items: center;
    gap: 0.5rem;
    animation: scrollPulse 2s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.scroll-indicator.show {
    display: flex;
}

.scroll-indicator i {
    animation: scrollBounce 1.5s ease-in-out infinite;
}

.comments-list {
    padding: 0;
}

.comment-item {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
    animation: commentSlideIn 0.5s ease-out;
}

.comment-item:hover {
    background: rgba(139, 92, 246, 0.05);
    transform: translateX(5px);
}

.comment-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-purple);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.comment-item:hover::before {
    transform: scaleY(1);
}

.comment-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    font-weight: 700;
}

.comment-avatar:hover {
    border-color: var(--purple);
    transform: scale(1.05);
}

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

.comment-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.comment-username {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.comment-verified {
    color: var(--blue);
    font-size: 0.8rem;
}

.comment-region {
    background: rgba(0, 242, 234, 0.1);
    color: var(--secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
    margin-bottom: 0.75rem;
}

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

.comment-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.comment-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.comment-stat:hover {
    color: var(--primary);
    transform: scale(1.05);
}

.comment-stat i {
    font-size: 0.9rem;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.comment-time {
    font-weight: 500;
}

.comment-id {
    font-family: 'Courier New', monospace;
    background: rgba(107, 114, 128, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 1rem 1.5rem;
    margin: 1rem;
    border-radius: 12px;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.error-message.show {
    display: flex;
    animation: errorSlideIn 0.3s ease-out;
}

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

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes logoShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes commentSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}
    
    .button-group {
display: flex;
gap: 1rem;
flex-wrap: wrap;
flex-shrink: 0;
justify-content: center;
}
    
    .header-content {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 1.5rem;
flex-direction: column;
}
    .search-container {
display: flex;
flex-direction: column;
gap: 1rem;
flex: 1;
max-width: 700px;
width: 100%;
}
    
    .search-form {
display: flex;
gap: 1rem;
position: relative;
width: 100%;
flex-direction: column;
}

/* Responsive Design */

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        padding: 0.5rem;
    }

    .header {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .main-content {
        gap: 0.75rem;
    }

    .video-player-wrapper {
        max-width: 200px;
    }

    .comments-container {
        max-height: calc(100vh - 150px);
        min-height: 200px;
    }

    .comment-item {
        padding: 0.75rem 1rem;
    }
}

/* Fix for input width consistency */
.search-input {
    flex: 1;
    min-width: 0;
    /* Prevents flex item from growing beyond container */
    width: 100%;
    /* Ensures consistent width */
    box-sizing: border-box;
}

.search-form {
    display: flex;
    gap: 1rem;
    position: relative;
    width: 100%;
    /* Ensures form takes full width */
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    max-width: 700px;
    width: 100%;
    /* Ensures container takes full width */
}

/* Ensure button group maintains consistent width */
.button-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
    /* Prevents buttons from shrinking */
}

/* Ensure search buttons maintain consistent width */
.search-btn,
.search-another-btn {
    white-space: nowrap;
    flex-shrink: 0;
    /* Prevents buttons from shrinking */
}

/* Additional fixes for input consistency */
.search-input:focus,
.search-input:not(:placeholder-shown),
.search-input:disabled {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 !important;
}

/* Ensure form layout consistency */
.search-form:has(.search-input:focus),
.search-form:has(.search-input:not(:placeholder-shown)) {
    width: 100% !important;
    display: flex !important;
    gap: 1rem !important;
}

/* Prevent any width changes during loading states */
.search-container:has(.search-btn:disabled) .search-input,
.search-container:has(.search-btn:disabled) .search-form {
    width: 100% !important;
    min-width: 0 !important;
}
    
    
    /* Responsive Design for smaller screens */
@media (max-width: 992px) {
.main-content {
grid-template-columns: 1fr; /* Stack video and comments vertically */
}

.video-section,
.comments-section {
margin-bottom: 1.5rem; /* Add spacing between stacked sections */
}

.comments-container {
max-height: 600px; /* Adjust max height for comments when stacked */
min-height: 300px;
}
}

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

.header {
padding: 1.5rem;
}

.header-content {
flex-direction: column; /* Stack logo, search, and buttons */
align-items: center;
text-align: center;
}

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

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

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

.logo-subtitle {
font-size: 0.8rem;
}

.search-container {
max-width: 100%; /* Allow search to take full width */
}

.search-form {
flex-direction: column; /* Stack search input and button */
gap: 0.75rem;
}

.search-input {
padding: 0.75rem 1rem !important;
font-size: 0.9rem !important;
}

.search-btn {
padding: 0.75rem 1.5rem;
font-size: 0.9rem;
width: 100%; /* Make search button full width */
}

.button-group {
width: 100%; /* Ensure button group takes full width */
justify-content: center; /* Center buttons */
gap: 0.75rem;
}

.search-another-btn {
padding: 0.75rem 1rem;
font-size: 0.9rem;
flex-grow: 1; /* Allow buttons to grow and share space */
}

.video-stats-bar {
padding: 0.75rem 1rem;
gap: 0.75rem;
}

.video-stat-item {
padding: 0.4rem 0.8rem;
font-size: 0.8rem;
}

.video-header {
padding: 1rem;
}

.video-title {
font-size: 1rem;
}

.video-author {
padding: 0.75rem;
gap: 0.75rem;
}

.author-avatar {
width: 40px;
height: 40px;
font-size: 1rem;
}

.author-info h4 {
font-size: 1rem;
}

.author-username {
font-size: 0.8rem;
}

.video-player-container {
padding: 1rem;
}

.video-player-wrapper {
max-width: 280px; /* Slightly smaller video player */
}

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

.video-controls {
padding: 1rem;
}

.control-btn {
width: 36px;
height: 36px;
font-size: 0.9rem;
}

.play-control-btn {
width: 42px;
height: 42px;
font-size: 1rem;
}

.volume-slider {
width: 60px;
}

.time-display {
font-size: 0.75rem;
}

.comments-header {
padding: 1rem;
}

.comments-title {
font-size: 1.1rem;
gap: 0.5rem;
}

.comments-count {
padding: 0.25rem 0.6rem;
font-size: 0.75rem;
min-width: 35px;
}

.comment-item {
padding: 1rem 1.25rem;
}

.comment-avatar {
width: 38px;
height: 38px;
font-size: 0.9rem;
}

.comment-user-info {
flex-direction: column; /* Stack user info elements if needed */
align-items: flex-start;
gap: 0.25rem;
}

.comment-author {
font-size: 0.9rem;
}

.comment-username {
font-size: 0.8rem;
}

.comment-text {
font-size: 0.9rem;
}

.comment-footer {
flex-direction: column; /* Stack footer elements */
align-items: flex-start;
gap: 0.75rem;
}

.comment-stats {
gap: 1rem;
}

.comment-stat {
font-size: 0.8rem;
}

.comment-meta {
font-size: 0.7rem;
}
}

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

.header {
padding: 1rem;
border-radius: 15px;
}

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

.search-input {
font-size: 0.85rem !important;
}

.search-btn,
.search-another-btn {
font-size: 0.85rem;
padding: 0.65rem 1.25rem;
border-radius: 12px;
}

.video-section,
.comments-section {
border-radius: 15px;
}

.video-stat-item {
font-size: 0.75rem;
padding: 0.3rem 0.6rem;
}

.video-title {
font-size: 0.95rem;
}

.author-info h4 {
font-size: 0.95rem;
}

.author-username {
font-size: 0.75rem;
}

.video-player-wrapper {
max-width: 250px; /* Smaller video player */
}

.play-button {
width: 50px;
height: 50px;
font-size: 1.2rem;
}

.control-btn {
width: 32px;
height: 32px;
font-size: 0.8rem;
}

.play-control-btn {
width: 38px;
height: 38px;
font-size: 0.9rem;
}

.comments-title {
font-size: 1rem;
}

.comment-item {
padding: 0.9rem 1rem;
}

.comment-avatar {
width: 34px;
height: 34px;
font-size: 0.8rem;
}

.comment-author {
font-size: 0.85rem;
}

.comment-username {
font-size: 0.75rem;
}

.comment-text {
font-size: 0.85rem;
}

.comment-stat {
font-size: 0.75rem;
}
.scroll-indicator {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: var(--gradient-purple);
color: white;
padding: 0.75rem 1.5rem;
border-radius: 25px;
font-size: 0.85rem;
font-weight: 600;
box-shadow: var(--shadow-lg);
z-index: 100;
display: none !important;
align-items: center;
gap: 0.5rem;
animation: scrollPulse 2s ease-in-out infinite;
cursor: pointer;
transition: all 0.3s ease;
}
}

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

.header {
padding: 0.75rem;
border-radius: 12px;
}

.logo-icon {
width: 45px;
height: 45px;
font-size: 1.3rem;
}

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

.search-input {
padding: 0.6rem 0.8rem !important;
font-size: 0.8rem !important;
}

.search-btn,
.search-another-btn {
font-size: 0.8rem;
padding: 0.5rem 1rem;
border-radius: 10px;
}

.video-section,
.comments-section {
border-radius: 12px;
}

.video-stat-item {
font-size: 0.7rem;
padding: 0.25rem 0.5rem;
flex-shrink: 0; /* Prevent items from squishing too much */
}

.video-title {
font-size: 0.9rem;
}

.author-avatar {
width: 35px;
height: 35px;
font-size: 0.9rem;
}

.author-info h4 {
font-size: 0.9rem;
}

.author-username {
font-size: 0.7rem;
}

.video-player-wrapper {
max-width: 220px; /* Even smaller video player */
}

.play-button {
width: 45px;
height: 45px;
font-size: 1.1rem;
}

.control-btn {
width: 30px;
height: 30px;
font-size: 0.75rem;
}

.play-control-btn {
width: 35px;
height: 35px;
font-size: 0.85rem;
}

.volume-control {
gap: 0.5rem;
}

.volume-slider {
width: 50px;
}

.time-display {
font-size: 0.7rem;
}

.comments-header {
padding: 0.75rem;
}

.comments-title {
font-size: 0.9rem;
}

.comments-count {
padding: 0.2rem 0.5rem;
font-size: 0.7rem;
min-width: 30px;
}

.comment-item {
padding: 0.8rem 0.9rem;
}

.comment-avatar {
width: 30px;
height: 30px;
font-size: 0.75rem;
}

.comment-author {
font-size: 0.8rem;
}

.comment-username {
font-size: 0.7rem;
}

.comment-text {
font-size: 0.8rem;
}

.comment-stats {
gap: 0.8rem;
}

.comment-stat {
font-size: 0.7rem;
}
.scroll-indicator {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: var(--gradient-purple);
color: white;
padding: 0.75rem 1.5rem;
border-radius: 25px;
font-size: 0.85rem;
font-weight: 600;
box-shadow: var(--shadow-lg);
z-index: 100;
display: none !important;
align-items: center;
gap: 0.5rem;
animation: scrollPulse 2s ease-in-out infinite;
cursor: pointer;
transition: all 0.3s ease;
}
}

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

.header {
padding: 0.6rem;
border-radius: 10px;
}

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

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

.logo-subtitle {
font-size: 0.7rem;
}

.search-input {
padding: 0.5rem 0.7rem !important;
font-size: 0.75rem !important;
}

.search-btn,
.search-another-btn {
font-size: 0.75rem;
padding: 0.45rem 0.9rem;
border-radius: 8px;
}

.video-section,
.comments-section {
border-radius: 10px;
}

.video-stats-bar {
padding: 0.6rem 0.7rem;
gap: 0.5rem;
}

.video-stat-item {
font-size: 0.65rem;
padding: 0.2rem 0.4rem;
}

.video-title {
font-size: 0.85rem;
margin-bottom: 0.75rem;
}

.author-avatar {
width: 32px;
height: 32px;
font-size: 0.8rem;
}

.author-info h4 {
font-size: 0.85rem;
}

.author-username {
font-size: 0.65rem;
}

.video-player-wrapper {
max-width: 190px; /* Smallest video player */
}

.play-button {
width: 40px;
height: 40px;
font-size: 1rem;
}

.control-btn {
width: 28px;
height: 28px;
font-size: 0.7rem;
}

.play-control-btn {
width: 32px;
height: 32px;
font-size: 0.8rem;
}

.volume-slider {
width: 45px;
}

.time-display {
font-size: 0.65rem;
}

.comments-header {
padding: 0.6rem;
}

.comments-title {
font-size: 0.85rem;
gap: 0.4rem;
}

.comments-count {
padding: 0.15rem 0.4rem;
font-size: 0.65rem;
min-width: 28px;
}

.comment-item {
padding: 0.7rem 0.8rem;
}

.comment-avatar {
width: 28px;
height: 28px;
font-size: 0.7rem;
}

.comment-author {
font-size: 0.75rem;
}

.comment-username {
font-size: 0.65rem;
}

.comment-text {
font-size: 0.75rem;
margin-bottom: 0.6rem;
}

.comment-stats {
gap: 0.7rem;
}

.comment-stat {
font-size: 0.65rem;
}

.comment-meta {
font-size: 0.6rem;
gap: 0.7rem;
}
.scroll-indicator {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: var(--gradient-purple);
color: white;
padding: 0.75rem 1.5rem;
border-radius: 25px;
font-size: 0.85rem;
font-weight: 600;
box-shadow: var(--shadow-lg);
z-index: 100;
display: none !important;
align-items: center;
gap: 0.5rem;
animation: scrollPulse 2s ease-in-out infinite;
cursor: pointer;
transition: all 0.3s ease;
}
}

/* --- Codex CSS updates --- */
:root {
    --primary: #ff2d6f;
    --secondary: #12d9d2;
    --accent: #fb4f93;
    --purple: #8b5cf6;
    --orange: #f97316;
    --green: #22c55e;
    --blue: #38bdf8;
    --bg-primary: #090f1f;
    --bg-secondary: #111a2e;
    --bg-tertiary: #1b2942;
    --bg-card: rgba(17, 26, 46, 0.78);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #8a99ad;
    --border: rgba(148, 163, 184, 0.22);
    --border-light: rgba(203, 213, 225, 0.34);
    --shadow: 0 10px 30px rgba(2, 6, 23, 0.24);
    --shadow-lg: 0 18px 54px rgba(2, 6, 23, 0.34);
    --shadow-xl: 0 26px 76px rgba(2, 6, 23, 0.46);
    --glow-primary: 0 0 34px rgba(255, 45, 111, 0.22);
    --glow-secondary: 0 0 34px rgba(18, 217, 210, 0.18);
    --gradient-primary: linear-gradient(135deg, #ff2d6f 0%, #fb4f93 48%, #ff8a3d 100%);
    --gradient-secondary: linear-gradient(135deg, #12d9d2 0%, #22c55e 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #fb4f93 100%);
    --gradient-bg: radial-gradient(circle at 18% 10%, rgba(255, 45, 111, 0.18), transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(18, 217, 210, 0.16), transparent 34%),
        linear-gradient(135deg, #090f1f 0%, #111a2e 52%, #16233b 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.tiktok_body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    line-height: 1.5;
}

.tiktok_body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    pointer-events: none;
    z-index: -1;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), transparent);
}

.container_tiktok {
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(0.85rem, 2vw, 1.5rem);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.header {
    background: linear-gradient(145deg, rgba(17, 26, 46, 0.84), rgba(27, 41, 66, 0.68));
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: clamp(1rem, 2.2vw, 2rem);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--gradient-primary);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 260px;
}

.logo-icon {
    width: 58px;
    height: 58px;
    background: var(--gradient-primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    color: #ffffff;
    box-shadow: var(--shadow-lg), var(--glow-primary);
    animation: logoFloat 3.5s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -55%;
    left: -55%;
    width: 210%;
    height: 210%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.26), transparent);
    animation: logoShine 3.8s ease-in-out infinite;
}

.logo-text {
    font-size: clamp(1.35rem, 2.1vw, 1.9rem);
    font-weight: 850;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #ffd3df 48%, #12d9d2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0;
    text-transform: capitalize !important;
}

.logo-subtitle {
    font-size: clamp(0.82rem, 1.3vw, 0.95rem);
    color: var(--text-secondary);
    font-weight: 550;
    margin-top: 0.35rem;
    text-transform: capitalize !important;
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 1 1 520px;
    max-width: 720px;
    width: 100%;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    position: relative;
    width: 100%;
}

.search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;
    padding: 0 1.1rem !important;
    background: rgba(255, 255, 255, 0.075) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 16px !important;
    color: var(--text-primary) !important;
    font-size: 0.98rem !important;
    font-weight: 550 !important;
    line-height: 54px !important;
    outline: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(2, 6, 23, 0.14) !important;
    resize: none !important;
    overflow: hidden !important;
    appearance: none;
}

.search-input:focus {
    border-color: rgba(255, 45, 111, 0.82) !important;
    box-shadow: 0 0 0 4px rgba(255, 45, 111, 0.14), var(--glow-primary), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px) !important;
    background: rgba(255, 255, 255, 0.105) !important;
}

.search-input::placeholder {
    color: #9aa8bb;
    font-weight: 450;
}

.search-input:not(:placeholder-shown) {
    background: rgba(255, 255, 255, 0.095);
    border-color: rgba(203, 213, 225, 0.42);
    font-weight: 600;
}

.search-btn {
    background: var(--gradient-primary);
    border: 0;
    color: #ffffff;
    min-height: 54px;
    height: 54px;
    padding: 0 1.35rem;
    border-radius: 16px;
    font-size: 0.96rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    box-shadow: 0 14px 34px rgba(255, 45, 111, 0.24), var(--shadow);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.search-btn::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 -100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transition: left 0.55s ease;
}

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

.search-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 18px 46px rgba(255, 45, 111, 0.3), var(--shadow-lg);
}

.search-btn:active:not(:disabled) {
    transform: translateY(0);
}

.search-btn:focus-visible,
.search-another-btn:focus-visible,
.control-btn:focus-visible,
.play-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(18, 217, 210, 0.18), var(--shadow-lg);
}

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

.search-another-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    min-height: 54px;
    height: 54px;
    padding: 0 1.15rem;
    border-radius: 16px;
    font-size: 0.94rem;
    font-weight: 750;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    white-space: nowrap;
    box-shadow: var(--shadow);
}

.search-another-btn:hover {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(18, 217, 210, 0.44);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--glow-secondary);
}

.button-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
    gap: 1.5rem;
    min-height: 0;
    width: 100%;
}

.video-section,
.comments-section {
    background: linear-gradient(145deg, rgba(17, 26, 46, 0.82), rgba(27, 41, 66, 0.7));
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.video-section::before,
.comments-section::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
}

.video-section::before {
    background: var(--gradient-secondary);
}

.comments-section::before {
    background: var(--gradient-purple);
}

.video-stats-bar {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(255, 45, 111, 0.12), rgba(139, 92, 246, 0.11));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.video-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    padding: 0.48rem 0.75rem;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    min-width: 0;
}

.video-stat-item i {
    font-size: 0.98rem;
}

.video-stat-item .fa-eye,
.fa-eye {
    color: #ec4899;
}

.video-stat-item .fa-heart,
.fa-heart {
    color: #ef4444;
}

.video-stat-item .fa-comment,
.fa-comment {
    color: #3b82f6;
}

.video-stat-item .fa-share,
.fa-share {
    color: #10b981;
}

.video-stat-value {
    font-weight: 850;
    color: var(--text-primary);
}

.video-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.video-title {
    font-size: clamp(1rem, 1.35vw, 1.15rem);
    font-weight: 750;
    margin-bottom: 1rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.video-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem;
    background: linear-gradient(135deg, rgba(18, 217, 210, 0.12), rgba(56, 189, 248, 0.08));
    border-radius: 16px;
    border: 1px solid rgba(18, 217, 210, 0.22);
    box-shadow: var(--shadow);
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(18, 217, 210, 0.8);
    box-shadow: 0 0 0 4px rgba(18, 217, 210, 0.08), var(--shadow);
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #ffffff;
    font-weight: 800;
    flex-shrink: 0;
}

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

.author-info h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.author-username {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 550;
}

.author-verified {
    color: var(--blue);
    font-size: 0.88rem;
}

.video-player-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 2vw, 1.5rem);
    position: relative;
}

.video-player-wrapper {
    position: relative;
    width: min(100%, 320px);
    max-width: 320px;
    aspect-ratio: 9 / 16;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.08);
    background: #000000;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.34);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.video-overlay:hover {
    background: rgba(2, 6, 23, 0.5);
}

.play-button {
    width: 76px;
    height: 76px;
    background: var(--gradient-primary);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl), var(--glow-primary);
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.32), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.play-button:hover::before {
    transform: translateX(100%);
}

.play-button:hover {
    transform: scale(1.08);
}

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

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

.video-controls {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 1.25rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 10;
}

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

.progress-container {
    margin-bottom: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 999px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 12px rgba(255, 45, 111, 0.5);
}

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

.control-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

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

.play-control-btn {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    font-size: 1.1rem;
    border: 0;
    box-shadow: var(--shadow-lg), var(--glow-primary);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.volume-slider {
    width: 76px;
    height: 7px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.volume-fill {
    height: 100%;
    background: var(--gradient-secondary);
    border-radius: 999px;
    width: 100%;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(18, 217, 210, 0.4);
}

.time-display {
    font-size: 0.78rem;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
}

.loading-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 5vw, 3rem);
    text-align: center;
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid rgba(148, 163, 184, 0.24);
    border-top: 3px solid var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 1.25rem;
}

.loading-text {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.comments-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(255, 45, 111, 0.1));
}

.comments-title {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    font-weight: 850;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-primary);
}

.comments-count {
    background: var(--gradient-purple);
    color: #ffffff;
    padding: 0.32rem 0.68rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 850;
    box-shadow: var(--shadow);
    min-width: 38px;
    text-align: center;
}

.comments-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    max-height: calc(100vh - 300px);
    min-height: 400px;
    position: relative;
    scrollbar-width: auto;
    scrollbar-color: var(--purple) var(--bg-secondary);
}

.comments-container::-webkit-scrollbar {
    width: 11px;
}

.comments-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    margin: 4px;
}

.comments-container::-webkit-scrollbar-thumb {
    background: var(--gradient-purple);
    border-radius: 999px;
    border: 2px solid var(--bg-secondary);
}

.comments-container::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-purple);
    color: #ffffff;
    padding: 0.7rem 1.15rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 750;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    align-items: center;
    gap: 0.45rem;
    animation: scrollPulse 2s ease-in-out infinite;
    cursor: pointer;
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.scroll-indicator.show {
    display: flex;
}

.scroll-indicator i {
    animation: scrollBounce 1.5s ease-in-out infinite;
}

.comments-list {
    padding: 0;
}

.comment-item {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    animation: commentSlideIn 0.45s ease-out;
}

.comment-item:hover {
    background: rgba(139, 92, 246, 0.075);
    transform: translateX(3px);
}

.comment-item::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--gradient-purple);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.comment-item:hover::before {
    transform: scaleY(1);
}

.comment-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.7rem;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
    flex-shrink: 0;
    box-shadow: var(--shadow);
    background: var(--gradient-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 800;
}

.comment-avatar:hover {
    border-color: var(--purple);
    transform: scale(1.04);
}

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

.comment-user-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.45rem;
    flex-wrap: wrap;
}

.comment-author {
    font-size: 0.93rem;
    font-weight: 800;
    color: var(--text-primary);
}

.comment-username {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 550;
}

.comment-verified {
    color: var(--blue);
    font-size: 0.78rem;
}

.comment-region {
    background: rgba(18, 217, 210, 0.12);
    color: var(--secondary);
    padding: 0.12rem 0.48rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.comment-text {
    font-size: 0.94rem;
    line-height: 1.58;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: anywhere;
    margin-bottom: 0.7rem;
}

.comment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.comment-stats {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    flex-wrap: wrap;
}

.comment-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.comment-stat:hover {
    color: var(--primary);
    transform: scale(1.04);
}

.comment-stat i {
    font-size: 0.88rem;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.comment-time {
    font-weight: 550;
}

.comment-id {
    font-family: 'Courier New', monospace;
    background: rgba(148, 163, 184, 0.12);
    padding: 0.12rem 0.35rem;
    border-radius: 6px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: clamp(2.5rem, 7vw, 4rem);
    margin-bottom: 1.25rem;
    opacity: 0.68;
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state h3 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 800;
    margin-bottom: 0.45rem;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 0.93rem;
    max-width: 34rem;
}

.error-message {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.34);
    color: #fca5a5;
    padding: 0.95rem 1.2rem;
    margin: 1rem;
    border-radius: 14px;
    display: none;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    box-shadow: 0 14px 34px rgba(127, 29, 29, 0.15);
}

.error-message.show {
    display: flex;
    animation: errorSlideIn 0.3s ease-out;
}

.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal;
    line-height: 1;
    display: inline-block;
    text-rendering: auto;
}

.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
    font-style: normal;
    line-height: 1;
    display: inline-block;
    text-rendering: auto;
}

.fa-check-circle {
    color: var(--blue);
}

.fa-chevron-down {
    color: currentColor;
}

.fa-comment-slash {
    color: var(--purple);
}

.fa-comments {
    color: #c084fc;
}

.fa-exclamation-triangle {
    color: #fca5a5;
}

.fa-pause,
.fa-play,
.fa-redo,
.fa-reply,
.fa-search,
.fa-spinner,
.fa-tiktok,
.fa-user,
.fa-users,
.fa-video,
.fa-volume-mute,
.fa-volume-up {
    color: currentColor;
}

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

.hidden {
    display: none !important;
}

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

@keyframes logoFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes logoShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes commentSlideIn {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%,
    100% {
        opacity: 0.84;
    }

    50% {
        opacity: 1;
    }
}

@keyframes scrollBounce {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(3px);
    }
}

.search-input:focus,
.search-input:not(:placeholder-shown),
.search-input:disabled {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
}

.search-form:has(.search-input:focus),
.search-form:has(.search-input:not(:placeholder-shown)) {
    width: 100% !important;
    display: flex !important;
    gap: 0.85rem !important;
}

.search-container:has(.search-btn:disabled) .search-input,
.search-container:has(.search-btn:disabled) .search-form {
    width: 100% !important;
    min-width: 0 !important;
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .video-section,
    .comments-section {
        margin-bottom: 1.25rem;
    }

    .comments-container {
        max-height: 620px;
        min-height: 320px;
    }

    .header-content {
        align-items: stretch;
    }

    .search-container {
        max-width: 100%;
    }
}

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

    .header {
        padding: 1.15rem;
        border-radius: 18px;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 1rem;
    }

    .logo {
        align-items: center;
        gap: 0.85rem;
        min-width: 0;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
        border-radius: 15px;
    }

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

    .logo-subtitle {
        font-size: 0.82rem;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .search-form:has(.search-input:focus),
    .search-form:has(.search-input:not(:placeholder-shown)) {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .search-input {
        height: 52px !important;
        min-height: 52px !important;
        max-height: 52px !important;
        line-height: 52px !important;
        padding: 0 1rem !important;
        font-size: 0.95rem !important;
    }

    .button-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 0.7rem;
    }

    .search-btn,
    .search-another-btn {
        width: 100%;
        min-height: 52px;
        height: 52px;
        padding: 0 1rem;
        font-size: 0.93rem;
    }

    .video-stats-bar {
        padding: 0.85rem;
        gap: 0.6rem;
    }

    .video-stat-item {
        flex: 1 1 calc(50% - 0.6rem);
        justify-content: center;
        font-size: 0.8rem;
        padding: 0.42rem 0.55rem;
    }

    .video-header {
        padding: 1rem;
    }

    .video-author {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .author-avatar {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
    }

    .video-player-wrapper {
        max-width: 280px;
    }

    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }

    .video-controls {
        padding: 1rem;
        transform: translateY(0);
    }

    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .play-control-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .volume-slider {
        width: 60px;
    }

    .comments-header {
        padding: 1rem;
    }

    .comment-item {
        padding: 1rem;
    }

    .comment-user-info,
    .comment-footer {
        align-items: flex-start;
    }

    .comment-footer {
        flex-direction: column;
        gap: 0.7rem;
    }
}

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

    .header,
    .video-section,
    .comments-section {
        border-radius: 16px;
    }

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

    .search-input {
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        line-height: 50px !important;
        font-size: 0.9rem !important;
    }

    .search-btn,
    .search-another-btn {
        min-height: 50px;
        height: 50px;
        font-size: 0.88rem;
        border-radius: 14px;
    }

    .video-stat-item {
        font-size: 0.75rem;
    }

    .video-player-wrapper {
        max-width: 250px;
    }

    .control-buttons {
        align-items: flex-start;
    }

    .empty-state {
        padding: 2.5rem 1rem;
    }

    .scroll-indicator {
        display: none !important;
    }
}

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

    .header {
        padding: 0.85rem;
        border-radius: 14px;
    }

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

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

    .logo-subtitle {
        font-size: 0.74rem;
    }

    .search-input {
        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;
        line-height: 48px !important;
        padding: 0 0.85rem !important;
        font-size: 0.86rem !important;
        border-radius: 13px !important;
    }

    .search-btn,
    .search-another-btn {
        min-height: 48px;
        height: 48px;
        font-size: 0.84rem;
        border-radius: 13px;
    }

    .video-section,
    .comments-section {
        border-radius: 14px;
    }

    .video-stat-item {
        flex: 1 1 100%;
        font-size: 0.72rem;
        flex-shrink: 0;
    }

    .video-player-wrapper {
        max-width: 220px;
    }

    .play-button {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .control-btn {
        width: 32px;
        height: 32px;
        font-size: 0.78rem;
    }

    .play-control-btn {
        width: 36px;
        height: 36px;
    }

    .volume-control {
        gap: 0.45rem;
    }

    .volume-slider {
        width: 48px;
    }

    .time-display {
        font-size: 0.68rem;
    }

    .comments-title {
        font-size: 0.95rem;
    }

    .comment-header {
        gap: 0.65rem;
    }

    .comment-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .comment-text {
        font-size: 0.84rem;
    }
}

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

    .header {
        padding: 0.75rem;
        border-radius: 12px;
    }

    .logo {
        gap: 0.65rem;
    }

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

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

    .search-input {
        font-size: 0.82rem !important;
    }

    .search-btn,
    .search-another-btn {
        font-size: 0.8rem;
    }

    .video-player-wrapper {
        max-width: 190px;
    }

    .comments-header {
        padding: 0.75rem;
    }

    .comment-item {
        padding: 0.8rem;
    }

    .comment-meta {
        font-size: 0.66rem;
        gap: 0.55rem;
    }
}

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

    .header {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .main-content {
        gap: 0.75rem;
    }

    .video-player-wrapper {
        max-width: 200px;
    }

    .comments-container {
        max-height: calc(100vh - 150px);
        min-height: 200px;
    }

    .comment-item {
        padding: 0.75rem 1rem;
    }
}