.tiktok-gallery:not(.tiktok-carousel) {
    display: grid;
    gap: 16px;
    padding: 20px 0;
}

.tiktok-carousel .swiper-viewport {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.tiktok-title {
    margin-bottom: 20px;
}

.tiktok-gallery[data-columns="1"] { grid-template-columns: repeat(1, 1fr); }
.tiktok-gallery[data-columns="2"] { grid-template-columns: repeat(2, 1fr); }
.tiktok-gallery[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.tiktok-gallery[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.tiktok-gallery[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.tiktok-gallery[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }

.tiktok-video {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.tiktok-video:before {
    content: '';
    position: absolute;
    width: 100%;
    bottom: 0px;
    height: 100px;
    background: linear-gradient(rgba(22, 24, 35, 0) 2.92%, rgba(22, 24, 35, 0.5) 98.99%);
    padding: 67px 13px 17px;
}

.tiktok-video .video-thumbnail {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.tiktok-video .video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tiktok-video .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 60%, rgba(0,0,0,0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    opacity: 0.8;
}

.tiktok-video:hover .video-overlay {
    opacity: 1;
}

.tiktok-video .play-button {
    background: rgba(22, 24, 35, 0.6);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: auto;
    margin-top: auto;
}

.tiktok-video .video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.tiktok-video .video-info {
    padding: 12px;
    color: white;
    position: absolute;
    bottom: 0;
}

.tiktok-video .video-info h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tiktok-video .video-info p {
    margin: 0;
    font-size: 12px;
    color: white;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tiktok-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    overflow: hidden;
}

.tiktok-modal .modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: transparent;
}

.tiktok-modal .close-modal {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    position: absolute;
    top: 3%;
    left: 3%;
}

.tiktok-modal .close-modal:hover {
    background: rgba(255,255,255,0.2);
}

.tiktok-modal .navigation {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tiktok-modal .nav-button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}


.tiktok-modal .prev-video {
    transform: rotate(-90deg);
}

.tiktok-modal .next-video {
    transform: rotate(90deg);
}


.tiktok-modal .nav-button:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
}

.tiktok-modal .nav-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tiktok-modal .modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.tiktok-modal .video-container {
    flex: 0 0 auto;
    width: 30vw;
    height: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.tiktok-modal .video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.tiktok-modal .video-sidebar {
    flex: 0 0 300px;
    height: 622px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.tiktok-modal .user-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.tiktok-modal .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.tiktok-modal .user-details {
    flex: 1;
}

.tiktok-modal .user-name {
    margin: 0 0 4px 0;
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.tiktok-modal .user-handle {
    margin: 0;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}
.tiktok-modal .user-bio {
    margin: 0;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.tiktok-modal .video-description {
    padding: 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    color: white;
    font-size: 14px;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
}

.tiktok-modal .video-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* TikTok Header */

.tiktok-header {
    margin-bottom: 30px;
}

.tiktok-header .profile-top {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tiktok-header .profile-avatar {
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
}

.tiktok-header .profile-info {
    flex: 1;
}

.tiktok-header .profile-username {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.tiktok-header .profile-handle {
    font-size: 16px;
    font-weight: 300;
    color: #333;
}

.tiktok-header .profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
}

.tiktok-header .stat-item {
    display: flex;
}

.tiktok-header .stat-number {
    font-size: 18px;
    font-weight: 700;
    display: block;
    margin-right: 6px;
}

.tiktok-header .stat-label {
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: #333;
    margin-top: 2px;
}

.tiktok-header .profile-bio {
    font-weight: 400;
    font-size: 16px;
    line-height: 21px;
    margin-bottom: 16px;
}

.tiktok-header .profile-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.tiktok-header .profile-link:hover {
    text-decoration: underline;
}

.tiktok-header .profile-actions {
    margin: 16px 0;
}

.tiktok-header .btn-tiktok {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    line-height: 21px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.tiktok-header .btn-follow {
    background-color: #fe2c55;
    color: #fff;
    min-width: 200px;
}

.tiktok-header .btn-follow:hover {
    transform: translateY(-2px);
}

@media (max-width: 1200px) {
    .tiktok-modal .modal-body {
        flex-direction: column;
        padding: 80px 20px 20px;
    }
    
    .tiktok-modal .video-container {
        width: 300px;
        height: 533px;
    }
    
    .tiktok-modal .video-sidebar {
        width: 100%;
        max-width: 400px;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .tiktok-modal .user-info,
    .tiktok-modal .video-description {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .tiktok-gallery[data-columns="4"],
    .tiktok-gallery[data-columns="5"],
    .tiktok-gallery[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tiktok-gallery[data-columns="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tiktok-modal .modal-body {
        padding: 60px 10px 10px;
    }
    
    .tiktok-modal .video-container {
        width: 280px;
        height: 497px;
    }
    
    .tiktok-modal .video-sidebar {
        max-width: 100%;
    }
    .profile-avatar {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .tiktok-gallery[data-columns="2"],
    .tiktok-gallery[data-columns="3"],
    .tiktok-gallery[data-columns="4"],
    .tiktok-gallery[data-columns="5"],
    .tiktok-gallery[data-columns="6"] {
        grid-template-columns: 1fr;
    }
    
    .tiktok-modal .video-container {
        width: 250px;
        height: 444px;
    }
    
    .tiktok-modal .user-info,
    .tiktok-modal .video-description {
        min-width: 100%;
    }

    .tiktok-header .tiktok-header {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
    
    .tiktok-header .profile-stats {
        gap: 15px;
    }
    
    .tiktok-header .stat-number {
        font-size: 16px;
    }
}