:root {
    --bg-color: #000;
    --text-color: #fff;
    --accent-color: #ff3b5c;
    /* TikTok red */
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body,
html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: var(--font-main);
}

.feed-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    background: #000;
    /* Hide scrollbar Firefox */
}

.feed-container::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.post {
    width: 100%;
    height: 100vh;
    height: 100svh;
    /* Short viewport height for mobile browsers */
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000 100%);
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.media-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.media-container img,
.media-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* UI Overlay */
.ui-overlay {
    position: absolute;
    right: 12px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    z-index: 10;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: transform 0.1s active;
}

.action-btn:active {
    transform: scale(0.9);
}

.icon-wrapper {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 8px;
    backdrop-filter: blur(8px);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-btn:active .icon-wrapper {
    transform: scale(1.3) rotate(-10deg);
    background: rgba(255, 255, 255, 0.2);
}

.icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.icon-heart {
    fill: #fff;
    transition: fill 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-heart.active {
    fill: var(--accent-color);
}

.count {
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    color: #fff;
}

/* Heart Pop Animation */
@keyframes heartPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.heart-burst {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    animation: heartPop 0.6s ease-out forwards;
}

/* Info Bar */
.info-bar {
    position: absolute;
    left: 16px;
    bottom: 24px;
    z-index: 10;
    color: #fff;
    max-width: 70%;
}

.username {
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 8px;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    background: linear-gradient(90deg, #fff, #ff3b5c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: filter 0.3s ease;
}

.username:hover {
    filter: brightness(1.2);
}

.description {
    font-size: 14px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Loading Spinner */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}