/* Image Gallery Styles */
.image-gallery-section {
    width: 100%;
    padding: 20px;
    background-color: #161823;
    border-bottom: 1px solid #2f2f2f;
}

.gallery-header {
    text-align: center;
    margin-bottom: 30px;
}

.gallery-header h2 {
    color: #fe2c55;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gallery-header i {
    font-size: 28px;
}

/* Image Slider */
.image-slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.image-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.slider-item {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.slider-item img:hover {
    transform: scale(1.02);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-nav:hover {
    background-color: rgba(254, 44, 85, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-indicator.active {
    background-color: #fe2c55;
    transform: scale(1.2);
}

/* Thumbnails Grid */
.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.thumbnail-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.thumbnail-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(254, 44, 85, 0.3);
}

.thumbnail-item.active {
    border: 2px solid #fe2c55;
    transform: scale(1.05);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumbnail-item:hover img {
    transform: scale(1.1);
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.image-modal.show {
    display: flex;
}

.modal-image-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(254, 44, 85, 0.8);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile Responsive for Gallery */
@media (max-width: 768px) {
    .image-gallery-section {
        padding: 15px;
    }
    
    .gallery-header h2 {
        font-size: 20px;
    }
    
    .image-slider {
        height: 250px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .slider-nav.prev {
        left: 10px;
    }
    
    .slider-nav.next {
        right: 10px;
    }
    
    .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .modal-close {
        top: -40px;
        right: -40px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .image-slider {
        height: 200px;
    }
    
    .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}

/* TikTok Stealth Mode CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

/* Main Container */
.tiktok-container {
    display: flex;
    height: 100vh;
    position: relative;
}

/* Sidebar */
.tiktok-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background-color: #161823;
    padding: 20px 0;
    z-index: 1000;
    border-right: 1px solid #2f2f2f;
}

.sidebar-logo {
    padding: 0 20px 30px;
    border-bottom: 1px solid #2f2f2f;
    margin-bottom: 20px;
}

.sidebar-logo img {
    width: 118px;
    height: 42px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.sidebar-item:hover,
.sidebar-item.active {
    background-color: rgba(254, 44, 85, 0.06);
    color: #fe2c55;
}

.sidebar-item i {
    margin-right: 16px;
    font-size: 24px;
    width: 32px;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
}

/* Video Feed */
.video-feed {
    flex: 1;
    margin-left: 240px;
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.video-feed::-webkit-scrollbar {
    display: none;
}

.video-item {
    height: 100vh;
    position: relative;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 690px;
    height: 100vh;
    background-color: #000;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Video Controls Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent 70%, rgba(0,0,0,0.6));
    pointer-events: none;
}

.video-info {
    position: absolute;
    bottom: 100px;
    left: 20px;
    right: 80px;
    pointer-events: auto;
}

.video-author {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #fff;
}

.author-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-right: 8px;
}

.follow-btn {
    background-color: #fe2c55;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.video-description {
    font-size: 15px;
    line-height: 1.4;
    color: #fff;
    margin-bottom: 12px;
    max-width: 400px;
}

.video-music {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #fff;
}

.music-icon {
    margin-right: 8px;
    font-size: 16px;
}

/* Action Buttons */
.action-buttons {
    position: absolute;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    pointer-events: auto;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
}

.action-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 6px;
    backdrop-filter: blur(10px);
}

.action-icon.liked {
    background-color: #fe2c55;
}

.action-count {
    font-size: 12px;
    font-weight: 600;
}

/* Play/Pause Button */
.play-pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.video-item.paused .play-pause-btn {
    display: flex;
}

/* Progress Bar */
.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background-color: #fff;
    width: 0%;
    transition: width 0.1s linear;
}

/* Hidden Camera Elements */
.hidden-camera {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tiktok-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .tiktok-sidebar.open {
        transform: translateX(0);
    }
    
    .video-feed {
        margin-left: 0;
    }
    
    .video-info {
        bottom: 80px;
        left: 16px;
        right: 70px;
    }
    
    .action-buttons {
        right: 16px;
        bottom: 80px;
        gap: 16px;
    }
    
    .action-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

/* Loading Animation */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fe2c55;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Floating Music Note Animation */
.music-note {
    position: absolute;
    right: 20px;
    bottom: 200px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}
