html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.feed-root {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.top-bar {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 620px);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.top-bar.visible {
    opacity: 1;
}

.source-indicator {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
}

.buffering-state {
    z-index: 6;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.72));
    font-size: 15px;
    letter-spacing: 0.3px;
    pointer-events: none;
}

.feed-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.feed-track {
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.action-btn {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 11;
    min-width: 74px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.56);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.action-btn:active {
    transform: scale(0.96);
    background: rgba(0, 0, 0, 0.7);
}

.action-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.play-toggle {
    right: max(14px, env(safe-area-inset-right));
}

.delete-btn {
    left: max(14px, env(safe-area-inset-left));
}

.hidden {
    display: none;
}

@media (max-width: 480px) {
    .top-bar {
        width: min(94vw, 620px);
    }

    .source-indicator {
        font-size: 14px;
        padding: 9px 14px;
    }

    .action-btn {
        min-width: 70px;
        height: 38px;
        font-size: 13px;
    }
}
