:root {
    --primary-color: #fe2c55;
    --text-color: #ffffff;
    --text-secondary: #rgba(255, 255, 255, 0.75);
    --bg-color: #000000;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --bottom-nav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden; /* Prevent body scroll, handle in feed */
    height: 100vh;
    width: 100vw;
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 500px; /* Mobile view constraint for desktop */
    margin: 0 auto;
    background: #000;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

/* Top Navigation */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
}

.nav-tabs {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.nav-tabs .active {
    color: white;
    position: relative;
}

.nav-tabs .active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

.search-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* Video Feed */
.video-feed {
    height: 100%;
    width: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
}

.video-feed::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.video-item {
    position: relative;
    height: 100%;
    width: 100%;
    scroll-snap-align: start;
    background: #111;
    overflow: hidden;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Overlay UI */
.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to video for play/pause */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 40%);
}

.side-bar {
    position: absolute;
    right: 10px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    pointer-events: auto;
    z-index: 10;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: transform 0.2s;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.icon-wrapper:active {
    transform: scale(0.9);
}

.action-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.avatar-container {
    position: relative;
    margin-bottom: 10px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid white;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.follow-plus {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.video-info {
    padding: 0 1rem;
    margin-bottom: 1rem;
    max-width: 80%;
    pointer-events: auto;
    text-align: left;
}

.user-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.video-desc {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.music-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.music-icon {
    animation: spin 3s linear infinite;
}

/* Bottom Navigation */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: black;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.7rem;
    gap: 2px;
    cursor: pointer;
}

.nav-item.active {
    color: white;
}

.nav-item i {
    font-size: 1.5rem;
}

.add-btn-container {
    width: 45px;
    height: 30px;
    background: linear-gradient(to right, #00f2ea, #ff0050);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}

.add-btn {
    width: 100%;
    height: 100%;
    background: white;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.like-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 5rem;
    color: var(--primary-color);
    pointer-events: none;
    animation: like-pop 0.8s ease-out forwards;
}

@keyframes like-pop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    30% { transform: translate(-50%, -50%) scale(0.9); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.liked {
    color: var(--primary-color) !important;
}
