/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    color: #ffffff;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    gap: 30px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

.top-nav .tab {
    font-size: 17px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px;
    cursor: pointer;
}

.top-nav .tab.active {
    color: #ffffff;
}

/* Video Container */
.video-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    position: relative;
}

.video-container::-webkit-scrollbar {
    display: none;
}

.video-item {
    height: 100vh;
    position: relative;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Right Side Icons */
.video-actions {
    position: absolute;
    right: 8px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
}

.action-button i {
    font-size: 28px;
    margin-bottom: 4px;
}

.action-button.heart.active {
    color: #FE2C55;
}

.action-button .count {
    font-size: 12px;
    font-weight: 600;
}

.profile-button img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: transparent;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    gap: 4px;
}

.nav-item.active {
    color: #ffffff;
}

.nav-item i {
    font-size: 20px;
}

.plus-button {
    width: 48px;
    height: 32px;
    background: linear-gradient(45deg, #FF0050, #00D4FF);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.plus-button::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: #ffffff;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.plus-button i {
    position: relative;
    z-index: 1;
    color: #000000;
    font-size: 18px;
    font-weight: bold;
}



/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #FE2C55;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Video Overlay */
.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    padding-bottom: 80px; /* Add extra padding to avoid bottom nav overlap */
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
}

.video-overlay .username {
    font-weight: 600;
    margin-bottom: 8px;
}

.video-overlay .caption {
    font-size: 14px;
    margin-bottom: 8px;
}

.video-overlay .hashtags {
    color: rgba(255, 255, 255, 0.9);
}

/* Music Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.music-disc {
    border-radius: 50%;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.music-disc.playing {
    animation: rotate 3s linear infinite;
}

.music-disc img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}
