@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);
    --secondary: #ff4fa3;
    --accent: #ff4fa3;
    --accent-purple: #ff7a59;
    --green: #2af0ea;
    --green-light: #25f4ee;
    --green-dark: #00f2ea;
    --orange: #ff7a59;
    --blue: #2af0ea;
    --bg-primary: #09040d;
    --bg-secondary: #120917;
    --bg-tertiary: #2e2142;
    --bg-card: rgba(22, 12, 32, 0.78);
    --text-primary: #ffffff;
    --text-secondary: #d9c7ef;
    --text-muted: #9f8dbd;
    --border: rgba(122, 243, 238, 0.22);
    --border-light: rgba(122, 243, 238, 0.15);
    --shadow: 0 4px 20px rgba(8, 4, 18, 0.3);
    --shadow-lg: 0 24px 56px rgba(8, 4, 18, 0.56);
    --shadow-xl: 0 24px 56px rgba(8, 4, 18, 0.56);
    --glow-primary: 0 0 30px rgba(42, 240, 234, 0.3);
    --glow-secondary: 0 0 30px rgba(255, 79, 163, 0.3);
    --gradient-primary: linear-gradient(135deg, #00f2ea 0%, #25f4ee 25%, #ff0050 75%, #ff4fa3 100%);
    --gradient-secondary: linear-gradient(135deg, #2af0ea 0%, #ff4fa3 100%);
    --gradient-green: linear-gradient(135deg, #2af0ea 0%, #ff4fa3 50%, #ff7a59 100%);
    --gradient-bg: linear-gradient(136deg, #09040d 0%, #150819 20%, #2a1033 42%, #3b0f2f 60%, #4a1638 78%, #120918 100%);
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 17px;
    --transition: all 0.3s cubic-bezier(.23, 1.02, .67, 1.01);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--transition);
}

.tiktok_body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    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%),
        var(--gradient-bg);
    background-size: 190% 190%, 180% 180%, 220% 220%, 210% 210%, 230% 230%, 240% 240%;
    animation: tiktok-aurora 16s ease-in-out infinite;
    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:
        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%);
    pointer-events: none;
    z-index: -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: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Logo Section */
.logo {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 0;
}

/* Header */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    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-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    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;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.logo-text .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.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(18, 9, 23, 0.68) !important;
    backdrop-filter: blur(15px) !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    outline: none !important;
    transition: var(--transition) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.search-input:focus {
    border-color: rgba(110, 238, 232, 0.78) !important;
    box-shadow: 0 0 0 4px rgba(42, 240, 234, 0.14), var(--glow-primary), inset 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-2px) !important;
    background: rgba(22, 12, 32, 0.78) !important;
}

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

.search-input:not(:placeholder-shown) {
    background: rgba(22, 12, 32, 0.78);
    border-color: var(--border-light);
    font-weight: 600;
}

.search-btn {
    background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff4fa3 75%, #ff0050 100%);;
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg), var(--glow-primary);
    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: var(--radius-md);
    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);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow), 0 0 15px rgba(42, 240, 234, 0.2);
}

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

/* Video Stats Bar */
.video-stats-bar {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(42, 240, 234, 0.1), rgba(255, 79, 163, 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(22, 12, 32, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
}

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

.video-stat-item .fa-eye {
    color: var(--primary);
}

.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(42, 240, 234, 0.1), rgba(255, 79, 163, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(42, 240, 234, 0.2);
    box-shadow: var(--shadow);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #00f2ea67 0%, #25f4ed52 25%, #ff4fa3 75%, #ff0050 100%);;
    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: var(--radius-xl);
    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(42, 240, 234, 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-primary);
    border-radius: 3px;
    width: 100%;
    transition: width 0.1s ease;
    box-shadow: 0 0 8px rgba(42, 240, 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;
    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-primary);
}

.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(42, 240, 234, 0.1), rgba(255, 79, 163, 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-primary);
    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-primary);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

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

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    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(42, 240, 234, 0.05);
    transform: translateX(5px);
}

.comment-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    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-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    font-weight: 700;
}

.comment-avatar:hover {
    border-color: var(--primary);
    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(42, 240, 234, 0.15);
    color: var(--primary);
    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-primary);
    -webkit-background-clip: text;
    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;
}
    
    .logo {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem 0;
    }

    .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_tiktok {
        padding: 0.5rem;
    }

    .logo {
        padding: 0.5rem 0;
        margin-bottom: 0.5rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

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

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

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

    .header-content {
        gap: 0.5rem;
    }

    .search-form {
        gap: 0.5rem;
    }

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

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

    .main-content {
        gap: 0.75rem;
    }

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

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

    .video-stat-item {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .video-header {
        padding: 0.5rem;
    }

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

    .video-author {
        padding: 0.5rem;
    }

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

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

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

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

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

    .comments-header {
        padding: 0.5rem;
    }

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

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

    .comment-avatar {
        width: 28px;
        height: 28px;
    }
}

/* 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) {
    .container_tiktok {
        padding: 1.25rem;
    }

    .main-content {
        grid-template-columns: 1fr; /* Stack video and comments vertically */
        gap: 1.25rem;
    }

    .logo {
        padding: 7rem 0 0;
        margin-bottom: 1.25rem;
        gap: 1.25rem;
    }

    .logo-icon {
        width: 55px;
        height: 55px;
        font-size: 1.7rem;
    }

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

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

    .header {
        padding: 1.75rem;
        margin-bottom: 1.25rem;
    }

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

    .video-stats-bar {
        padding: 0.875rem 1.25rem;
        gap: 0.875rem;
    }

    .video-stat-item {
        padding: 0.45rem 0.9rem;
        font-size: 0.85rem;
    }

    .video-header {
        padding: 1.25rem;
    }

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

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

    .author-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

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

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

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

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

    .play-button {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .video-controls {
        padding: 1.25rem;
    }

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

    .play-control-btn {
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .volume-slider {
        width: 70px;
    }

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

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

    .comments-header {
        padding: 1.25rem;
    }

    .comments-title {
        font-size: 1.2rem;
        gap: 0.625rem;
    }

    .comments-count {
        padding: 0.3rem 0.7rem;
        font-size: 0.8rem;
        min-width: 38px;
    }

    .comment-item {
        padding: 1.125rem 1.375rem;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

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

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

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

    .comment-stats {
        gap: 1.25rem;
    }

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

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

    .loading-spinner {
        width: 55px;
        height: 55px;
    }

    .loading-text {
        font-size: 1.1rem;
    }

    .loading-subtext {
        font-size: 0.85rem;
    }

    .empty-state {
        padding: 3.5rem 1.5rem;
    }

    .empty-state i {
        font-size: 3.5rem;
    }

    .empty-state h3 {
        font-size: 1.4rem;
    }
}

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

    .logo {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        margin-bottom: 1rem;
        padding: 1rem 0;
    }

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

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

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

    .header {
        padding: 1.5rem;
        margin-bottom: 1.25rem;
    }

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

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

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

    .search-input {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        width: 100% !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;
        flex-direction: column;
    }

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

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

    .video-stat-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        flex: 1 1 auto;
        min-width: calc(50% - 0.375rem);
    }

    .video-header {
        padding: 1rem;
    }

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

    .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-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .control-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

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

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

    .volume-control {
        flex-wrap: wrap;
    }

    .volume-slider {
        width: 60px;
    }

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

    .comments-container {
        max-height: 500px;
        min-height: 250px;
    }

    .comments-header {
        padding: 1rem;
    }

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

    .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-wrap: wrap;
        gap: 0.5rem;
    }

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

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

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

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

    .comment-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }

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

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

    .loading-spinner {
        width: 50px;
        height: 50px;
    }

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

    .loading-subtext {
        font-size: 0.8rem;
    }

    .empty-state {
        padding: 3rem 1.25rem;
    }

    .empty-state i {
        font-size: 3rem;
    }

    .empty-state h3 {
        font-size: 1.3rem;
    }

    .scroll-indicator {
        padding: 0.65rem 1.25rem;
        font-size: 0.8rem;
    }
}

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

    .logo {
        padding: 7rem 0 0;
        margin-bottom: 0.875rem;
        gap: 0.625rem;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

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

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

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

    .header-content {
        gap: 1rem;
    }

    .search-container {
        gap: 0.75rem;
    }

    .search-form {
        gap: 0.625rem;
    }

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

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

    .button-group {
        gap: 0.625rem;
    }

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

    .video-stats-bar {
        padding: 0.65rem 0.875rem;
        gap: 0.625rem;
    }

    .video-stat-item {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        min-width: calc(50% - 0.3125rem);
    }

    .video-header {
        padding: 0.875rem;
    }

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

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

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

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

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

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

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

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

    .video-controls {
        padding: 0.875rem;
    }

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

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

    .volume-slider {
        width: 55px;
    }

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

    .comments-container {
        max-height: 450px;
        min-height: 200px;
    }

    .comments-header {
        padding: 0.875rem;
    }

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

    .comments-count {
        padding: 0.225rem 0.55rem;
        font-size: 0.7rem;
        min-width: 32px;
    }

    .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;
        line-height: 1.45;
    }

    .comment-stats {
        gap: 0.875rem;
    }

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

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

    .loading-spinner {
        width: 45px;
        height: 45px;
    }

    .loading-text {
        font-size: 0.95rem;
    }

    .loading-subtext {
        font-size: 0.75rem;
    }

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

    .empty-state i {
        font-size: 2.5rem;
    }

    .empty-state h3 {
        font-size: 1.2rem;
    }

    .scroll-indicator {
        padding: 0.6rem 1.15rem;
        font-size: 0.75rem;
    }
}

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

    .logo {
        padding: 0.75rem 0;
        margin-bottom: 0.75rem;
        gap: 0.5rem;
    }

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

    .logo-text {
        font-size: 1.2rem;
        line-height: 1.2;
    }

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

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

    .header-content {
        gap: 0.75rem;
    }

    .search-container {
        gap: 0.625rem;
    }

    .search-form {
        gap: 0.5rem;
    }

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

    .button-group {
        gap: 0.5rem;
    }

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

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

    .video-stat-item {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        flex-shrink: 0; /* Prevent items from squishing too much */
        min-width: calc(50% - 0.25rem);
    }

    .video-header {
        padding: 0.75rem;
    }

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

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

    .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-container {
        padding: 0.75rem;
    }

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

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

    .video-controls {
        padding: 0.75rem;
    }

    .control-buttons {
        gap: 0.4rem;
    }

    .control-group {
        gap: 0.4rem;
    }

    .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-container {
        max-height: 400px;
        min-height: 180px;
    }

    .comments-header {
        padding: 0.75rem;
    }

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

    .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;
        line-height: 1.4;
    }

    .comment-stats {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

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

    .comment-meta {
        font-size: 0.65rem;
        gap: 0.5rem;
    }

    .loading-spinner {
        width: 40px;
        height: 40px;
    }

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

    .loading-subtext {
        font-size: 0.7rem;
    }

    .empty-state {
        padding: 2rem 0.875rem;
    }

    .empty-state i {
        font-size: 2.25rem;
    }

    .empty-state h3 {
        font-size: 1.1rem;
    }

    .scroll-indicator {
        padding: 0.55rem 1rem;
        font-size: 0.7rem;
    }
}

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

    .logo {
        padding: 7rem 0 0;
        margin-bottom: 0.65rem;
        gap: 0.45rem;
    }

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

    .logo-text {
        font-size: 1.1rem;
        line-height: 1.2;
    }

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

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

    .header-content {
        gap: 0.65rem;
    }

    .search-container {
        gap: 0.5rem;
    }

    .search-form {
        gap: 0.45rem;
    }

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

    .button-group {
        gap: 0.45rem;
    }

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

    .video-stats-bar {
        padding: 0.5rem 0.65rem;
        gap: 0.45rem;
    }

    .video-stat-item {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        min-width: calc(50% - 0.225rem);
    }

    .video-header {
        padding: 0.65rem;
    }

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

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

    .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-container {
        padding: 0.65rem;
    }

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

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

    .video-controls {
        padding: 0.65rem;
    }

    .control-buttons {
        gap: 0.35rem;
    }

    .control-group {
        gap: 0.35rem;
    }

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

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

    .volume-control {
        gap: 0.4rem;
    }

    .volume-slider {
        width: 45px;
    }

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

    .comments-container {
        max-height: 350px;
        min-height: 160px;
    }

    .comments-header {
        padding: 0.6rem;
    }

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

    .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;
        line-height: 1.4;
    }

    .comment-stats {
        gap: 0.7rem;
        flex-wrap: wrap;
    }

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

    .comment-meta {
        font-size: 0.6rem;
        gap: 0.5rem;
    }

    .loading-spinner {
        width: 35px;
        height: 35px;
    }

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

    .loading-subtext {
        font-size: 0.65rem;
    }

    .empty-state {
        padding: 1.75rem 0.75rem;
    }

    .empty-state i {
        font-size: 2rem;
    }

    .empty-state h3 {
        font-size: 1rem;
    }

    .scroll-indicator {
        padding: 0.5rem 0.9rem;
        font-size: 0.65rem;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .container_tiktok {
        padding: 0.35rem;
    }

    .logo {
        padding: 0.55rem 0;
        margin-bottom: 0.55rem;
        gap: 0.4rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .logo-text {
        font-size: 0.95rem;
        line-height: 1.15;
    }

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

    .header {
        padding: 0.55rem;
        border-radius: 8px;
        margin-bottom: 0.55rem;
    }

    .header-content {
        gap: 0.55rem;
    }

    .search-container {
        gap: 0.45rem;
    }

    .search-form {
        gap: 0.4rem;
    }

    .search-input {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.7rem !important;
    }

    .search-btn,
    .search-another-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        border-radius: 7px;
    }

    .button-group {
        gap: 0.4rem;
    }

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

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

    .video-stat-item {
        font-size: 0.6rem;
        padding: 0.175rem 0.35rem;
        min-width: calc(50% - 0.2rem);
    }

    .video-header {
        padding: 0.55rem;
    }

    .video-title {
        font-size: 0.8rem;
        line-height: 1.25;
    }

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

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

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

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

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

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

    .play-button {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .video-controls {
        padding: 0.55rem;
    }

    .control-btn {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }

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

    .volume-slider {
        width: 40px;
    }

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

    .comments-container {
        max-height: 300px;
        min-height: 140px;
    }

    .comments-header {
        padding: 0.55rem;
    }

    .comments-title {
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .comments-count {
        padding: 0.125rem 0.35rem;
        font-size: 0.6rem;
        min-width: 26px;
    }

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

    .comment-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }

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

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

    .comment-text {
        font-size: 0.7rem;
        line-height: 1.35;
    }

    .comment-stats {
        gap: 0.6rem;
    }

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

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

    .loading-spinner {
        width: 30px;
        height: 30px;
    }

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

    .loading-subtext {
        font-size: 0.6rem;
    }

    .empty-state {
        padding: 1.5rem 0.65rem;
    }

    .empty-state i {
        font-size: 1.75rem;
    }

    .empty-state h3 {
        font-size: 0.95rem;
    }

    .scroll-indicator {
        padding: 0.45rem 0.8rem;
        font-size: 0.6rem;
    }
}

/* --- Codex CSS updates --- */
:root {
    --primary: #25f4ee;
    --primary-glow: rgba(37, 244, 238, 0.32);
    --secondary: #ff0050;
    --accent: #ff4fa3;
    --accent-purple: #ff7a59;
    --green: #25f4ee;
    --green-light: #7cfaf6;
    --green-dark: #00d8d0;
    --orange: #ff7a59;
    --blue: #25f4ee;
    --bg-primary: #07070a;
    --bg-secondary: #111118;
    --bg-tertiary: #1d1d2a;
    --bg-card: rgba(17, 17, 24, 0.86);
    --text-primary: #ffffff;
    --text-secondary: #d8e5ea;
    --text-muted: #9dadb4;
    --border: rgba(37, 244, 238, 0.22);
    --border-light: rgba(255, 255, 255, 0.12);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.42);
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 30px rgba(37, 244, 238, 0.28);
    --glow-secondary: 0 0 30px rgba(255, 0, 80, 0.26);
    --gradient-primary: linear-gradient(135deg, #25f4ee 0%, #00d8d0 36%, #ff0050 100%);
    --gradient-secondary: linear-gradient(135deg, #25f4ee 0%, #ff0050 100%);
    --gradient-green: linear-gradient(135deg, #25f4ee 0%, #ff0050 55%, #ff7a59 100%);
    --gradient-bg: linear-gradient(135deg, #07070a 0%, #101018 36%, #170b16 64%, #220914 100%);
    --radius-md: 12px;
    --radius-lg: 14px;
    --radius-xl: 17px;
    --transition: all 0.3s cubic-bezier(.23, 1.02, .67, 1.01);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--transition);
}

.tiktok_body {
    width: 100%;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 244, 238, 0.2), transparent 34%),
        radial-gradient(circle at 88% 16%, rgba(255, 0, 80, 0.22), transparent 38%),
        radial-gradient(circle at 78% 82%, rgba(255, 122, 89, 0.11), transparent 42%),
        var(--gradient-bg);
    background-size: 190% 190%, 180% 180%, 220% 220%, 240% 240%;
    animation: tiktok-aurora 16s ease-in-out infinite;
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    padding: 0;
}

.tiktok_body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(4, 4, 8, 0.55), rgba(18, 9, 22, 0.22)),
        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%);
    pointer-events: none;
    z-index: 0;
}

@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: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 0;
}

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

.header::before,
.video-section::before,
.comments-section::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: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    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;
    flex-shrink: 0;
}

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

.logo-text {
    font-family: 'Sora', 'Manrope', sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.15;
    overflow-wrap: anywhere;
    letter-spacing: 0;
}

.logo-text .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

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

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

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

.search-input {
    flex: 1 !important;
    min-width: 0;
    width: 100%;
    padding: 1rem 1.25rem !important;
    background: rgba(7, 7, 10, 0.72) !important;
    backdrop-filter: blur(15px) !important;
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    outline: none !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18) !important;
}

.search-input:focus {
    border-color: rgba(37, 244, 238, 0.82) !important;
    box-shadow: 0 0 0 4px rgba(37, 244, 238, 0.14), var(--glow-primary), inset 0 2px 4px rgba(0, 0, 0, 0.18) !important;
    transform: translateY(-2px) !important;
    background: rgba(17, 17, 24, 0.92) !important;
}

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

.search-input:not(:placeholder-shown) {
    background: rgba(17, 17, 24, 0.92);
    border-color: var(--border-light);
    font-weight: 600;
}

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

.search-btn,
.search-another-btn {
    min-height: 52px;
    border-radius: var(--radius-md);
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-btn {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 1rem 1.6rem;
    box-shadow: var(--shadow-lg), var(--glow-primary);
    position: relative;
    overflow: hidden;
}

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

.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: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 1rem 1.4rem;
}

.search-another-btn:hover {
    background: rgba(37, 244, 238, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow), 0 0 15px rgba(37, 244, 238, 0.2);
}

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

.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 1.5rem;
    min-height: 0;
}

.video-section,
.comments-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-width: 0;
}

#videoContent {
    display: none;
    height: 100%;
    flex-direction: column;
}

.video-stats-bar {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.1), rgba(255, 0, 80, 0.1));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.video-stat-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 0.5rem 0.8rem;
    background: rgba(7, 7, 10, 0.46);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    min-width: 0;
}

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

.video-stat-item .fa-eye,
.fa-eye {
    color: var(--primary);
}

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

.video-stat-item .fa-comment,
.fa-comment {
    color: #7dd3fc;
}

.video-stat-item .fa-share,
.fa-share {
    color: #34d399;
}

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

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

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

.video-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(37, 244, 238, 0.1), rgba(255, 0, 80, 0.1));
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    min-width: 0;
}

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

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

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

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

.author-verified,
.author-info .author-verified,
.comment-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: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: #000;
}

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

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

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

.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);
    position: relative;
    overflow: hidden;
}

.play-button::before {
    content: '';
    position: absolute;
    inset: 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);
}

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

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

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

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

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

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

.progress-bar {
    width: 100%;
    height: 6px;
}

.progress-fill,
.volume-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(37, 244, 238, 0.5);
}

.progress-fill {
    width: 0%;
    transition: width 0.1s linear;
}

.volume-fill {
    width: 100%;
    transition: width 0.1s ease;
}

.control-buttons,
.control-group,
.volume-control {
    display: flex;
    align-items: center;
}

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

.control-group {
    gap: 0.75rem;
}

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

.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 {
    gap: 0.75rem;
}

.volume-slider {
    width: 80px;
    height: 6px;
}

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

.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: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.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(37, 244, 238, 0.1), rgba(255, 0, 80, 0.1));
}

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

.comments-count {
    background: var(--gradient-primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    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;
    scrollbar-width: auto;
    scrollbar-color: var(--primary) var(--bg-secondary);
}

.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-primary);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

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

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    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;
}

.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);
    position: relative;
    animation: commentSlideIn 0.5s ease-out;
}

.comment-item:hover {
    background: rgba(37, 244, 238, 0.05);
    transform: translateX(5px);
}

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

.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;
    box-shadow: var(--shadow);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    font-weight: 700;
}

.comment-avatar:hover {
    border-color: var(--primary);
    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: 800;
    color: var(--text-primary);
}

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

.comment-region {
    background: rgba(37, 244, 238, 0.14);
    color: var(--primary);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-primary);
    overflow-wrap: anywhere;
    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);
    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(255, 255, 255, 0.08);
    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.68;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.empty-state p {
    color: var(--text-secondary);
    line-height: 1.5;
}

.error-message {
    background: rgba(255, 59, 104, 0.12);
    border: 1px solid rgba(255, 59, 104, 0.34);
    color: #ff8ca6;
    padding: 1rem 1.5rem;
    margin: 1rem;
    border-radius: 12px;
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

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

.hidden {
    display: none !important;
}

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

.fa-tiktok,
.fa-search,
.fa-redo,
.fa-user,
.fa-check-circle,
.fa-play,
.fa-pause,
.fa-volume-up,
.fa-volume-mute,
.fa-video,
.fa-comments,
.fa-comment-slash,
.fa-exclamation-triangle,
.fa-chevron-down,
.fa-spinner {
    line-height: 1;
}

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

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

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

.fa-comment-slash,
.fa-comments,
.fa-video {
    color: currentColor;
}

.search-btn:focus-visible,
.search-another-btn:focus-visible,
.control-btn:focus-visible,
.play-button:focus-visible,
.search-input:focus-visible {
    outline: 3px solid rgba(37, 244, 238, 0.38);
    outline-offset: 3px;
}

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

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

    .logo {
        padding: 0.5rem 0;
        margin-bottom: 0.5rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

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

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

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

    .header-content {
        gap: 0.5rem;
    }

    .search-form {
        gap: 0.5rem;
    }

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

    .search-btn,
    .search-another-btn {
        min-height: 40px;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .main-content {
        gap: 0.75rem;
    }

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

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

    .video-stat-item {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .video-header {
        padding: 0.5rem;
    }

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

    .video-author {
        padding: 0.5rem;
    }

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

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

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

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

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

    .comments-header {
        padding: 0.5rem;
    }

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

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

    .comment-avatar {
        width: 28px;
        height: 28px;
    }
}

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

    .main-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .logo {
        padding: 1.25rem 0 0;
        margin-bottom: 1.25rem;
        gap: 1.25rem;
    }

    .logo-icon {
        width: 55px;
        height: 55px;
        font-size: 1.7rem;
    }

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

    .header {
        padding: 1.75rem;
        margin-bottom: 1.25rem;
    }

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

    .comments-container {
        max-height: 600px;
        min-height: 300px;
    }
}

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

    .logo {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        margin-bottom: 1rem;
        padding: 1rem 0;
    }

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

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

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

    .header {
        padding: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
    }

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

    .search-form {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

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

    .search-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
    }

    .button-group {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
        flex-direction: column;
    }

    .search-another-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }

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

    .video-stat-item {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        flex: 1 1 auto;
        min-width: calc(50% - 0.375rem);
    }

    .video-header,
    .comments-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;
    }

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

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

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

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

    .control-buttons,
    .control-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

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

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

    .volume-control {
        flex-wrap: wrap;
    }

    .volume-slider {
        width: 60px;
    }

    .comments-container {
        max-height: 500px;
        min-height: 250px;
    }

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

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

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

    .comment-stats,
    .comment-meta {
        flex-wrap: wrap;
    }
}

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

    .logo {
        padding: 1rem 0 0;
        margin-bottom: 0.875rem;
        gap: 0.625rem;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

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

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

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

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

    .search-btn,
    .search-another-btn {
        min-height: 46px;
        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-player-wrapper {
        max-width: 250px;
    }

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

    .comments-container {
        max-height: 450px;
        min-height: 200px;
    }

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

    .empty-state i {
        font-size: 2.5rem;
    }
}

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

    .logo {
        padding: 0.75rem 0;
        margin-bottom: 0.75rem;
        gap: 0.5rem;
    }

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

    .logo-text {
        font-size: 1.2rem;
        line-height: 1.2;
    }

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

    .video-stat-item {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        min-width: calc(50% - 0.25rem);
    }

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

    .control-buttons {
        gap: 0.4rem;
    }

    .control-group {
        gap: 0.4rem;
    }

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

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

    .volume-slider {
        width: 50px;
    }

    .comments-container {
        max-height: 400px;
        min-height: 180px;
    }

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

    .comment-header {
        gap: 0.7rem;
    }

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

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

    .logo {
        padding: 0.55rem 0;
        margin-bottom: 0.55rem;
        gap: 0.4rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }

    .logo-text {
        font-size: 0.95rem;
        line-height: 1.15;
    }

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

    .header {
        padding: 0.55rem;
        border-radius: 8px;
    }

    .search-input {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.7rem !important;
    }

    .search-btn,
    .search-another-btn {
        min-height: 38px;
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        border-radius: 7px;
    }

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

    .play-button {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .comments-container {
        max-height: 300px;
        min-height: 140px;
    }
}