/* ═══════════════════════════════════════════
   Doomscroll / Shorts — vertical video feed
   ═══════════════════════════════════════════ */

/* Container fills viewport, snap-scroll vertically */
.shorts-feed {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    background: #000;
}

/* Hide scrollbar */
.shorts-feed::-webkit-scrollbar {
    display: none;
}

.shorts-feed {
    scrollbar-width: none;
}

/* Each video card fills one viewport */
.short-card {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

/* Video fills card, maintain aspect ratio */
.short-card video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Gradient overlays for text readability */
.short-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .5), transparent);
    pointer-events: none;
    z-index: 2;
}

.short-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent);
    pointer-events: none;
    z-index: 2;
}

/* ── Info bar (bottom left) ── */
.short-info {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 80px;
    z-index: 3;
    color: #fff;
}

.short-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.short-channel {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
}

.short-channel:hover .short-channel-name {
    text-decoration: underline;
}

.short-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    flex-shrink: 0;
    object-fit: cover;
}

.short-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.short-channel-name {
    font-size: .9rem;
    font-weight: 500;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}

.short-meta {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: .8rem;
    color: rgba(255, 255, 255, .65);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

/* ── Action buttons (right side) ── */
.short-actions {
    position: absolute;
    bottom: 20px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 3;
    align-items: center;
}

.short-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: transform .15s;
    -webkit-tap-highlight-color: transparent;
}

.short-action-btn:active {
    transform: scale(0.9);
}

.short-action-btn svg {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .5));
    transition: fill .15s, stroke .15s;
}

.short-action-btn .action-count {
    font-size: .75rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

/* Vote active states */
.short-action-btn.upvoted svg {
    fill: #69f0ae;
    stroke: #69f0ae;
}

.short-action-btn.upvoted .action-count {
    color: #69f0ae;
}

.short-action-btn.downvoted svg {
    fill: #ff5252;
    stroke: #ff5252;
}

.short-action-btn.downvoted .action-count {
    color: #ff5252;
}

/* ── Play/Pause overlay ── */
.short-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
}

.short-play-overlay.show {
    opacity: 1;
}

.short-play-overlay svg {
    width: 64px;
    height: 64px;
    fill: rgba(255, 255, 255, .8);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .5));
}

/* ── Mute indicator ── */
.short-mute-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: .85rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}

.short-mute-hint.show {
    opacity: 1;
}

/* ── Loading spinner ── */
.shorts-loading {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.shorts-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, .15);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

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

/* ── Empty state ── */
.shorts-empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #888;
    gap: 12px;
}

.shorts-empty-icon {
    font-size: 3rem;
}

.shorts-empty-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* ── Duration badge ── */
.short-duration {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 600;
    z-index: 3;
}

/* ── Timeline bar ── */
.short-timeline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 5;
    cursor: pointer;
    transition: height 0.15s;
    touch-action: none;
}

.short-timeline:hover,
.short-timeline:active {
    height: 8px;
}

.short-timeline-progress {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    pointer-events: none;
    transition: none;
}

/* ── Mute button states ── */
.short-mute-btn.muted {
    opacity: 0.55;
}

/* ── Responsive ── */
@media (min-width: 768px) {
    .short-info {
        left: 24px;
        right: 80px;
    }

    .short-actions {
        right: 16px;
    }

    .short-duration {
        right: 16px;
    }
}