/* ===== MiniFinity Page Styles ===== */

/* Layout Override — Full screen feed */
.minifinity-layout {
    padding: 0 !important;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Page Title — Top left below topbar */
.minifinity-page-title {
    position: absolute;
    top: calc(var(--topbar-height, 56px) + 12px);
    left: 20px;
    z-index: 20;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.minifinity-page-title svg {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
}

/* Feed Container */
.minifinity-feed {
    flex: 1;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

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

.minifinity-feed {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html.no-smooth-scroll .minifinity-feed {
    scroll-behavior: auto;
}

/* Individual Short Item */
.minifinity-item {
    width: 100%;
    height: calc(100vh - var(--topbar-height, 60px));
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    contain: content;
}

/* Video Container */
.minifinity-video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.minifinity-iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
}

/* Side Action Buttons */
.minifinity-actions {
    position: absolute;
    right: 20px;
    bottom: 180px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.minifinity-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.minifinity-action-btn svg {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
}

.minifinity-action-btn:hover svg {
    transform: scale(1.15);
}

.minifinity-action-btn .action-label {
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Like active */
.like-btn.active {
    color: #ef4444;
}

.like-btn.active svg {
    animation: likePopup 0.4s ease;
}

@keyframes likePopup {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Save active */
.save-btn.active {
    color: #fbbf24;
}

/* Bottom Info Overlay */
.minifinity-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 80px;
    padding: 80px 24px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 10;
    pointer-events: none;
}

.minifinity-info-top {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 8px;
}

.minifinity-anime-poster {
    width: 52px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.minifinity-meta {
    flex: 1;
    min-width: 0;
}

.minifinity-anime-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.minifinity-anime-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
}

.minifinity-score {
    color: #fbbf24;
    font-weight: 600;
}

.minifinity-genres {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.minifinity-genre-tag {
    background: rgba(138, 92, 246, 0.5);
    color: #fff;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.minifinity-synopsis {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin: 0;
}

/* Navigation Arrows */
.minifinity-nav-btn {
    position: fixed;
    right: 100px;
    z-index: 30;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.minifinity-nav-btn:hover {
    background: var(--accent-primary);
    border-color: transparent;
    transform: scale(1.1);
}

.minifinity-prev {
    top: 80px;
}

.minifinity-next {
    bottom: 20px;
}

/* Loading */
.minifinity-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: calc(100vh - var(--topbar-height, 60px));
    color: var(--text-muted);
    gap: 16px;
}

.minifinity-loading p {
    font-size: 14px;
}

/* Empty State */
.minifinity-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: calc(100vh - var(--topbar-height, 60px));
    color: var(--text-muted);
    text-align: center;
    gap: 12px;
}

.minifinity-empty svg {
    opacity: 0.4;
}

.minifinity-empty h3 {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .minifinity-actions {
        right: 12px;
        bottom: 140px;
        gap: 16px;
    }

    .minifinity-action-btn svg {
        width: 24px;
        height: 24px;
    }

    .minifinity-info {
        right: 60px;
        padding: 60px 16px 16px;
    }

    .minifinity-anime-title {
        font-size: 15px;
    }

    .minifinity-anime-poster {
        width: 42px;
        height: 58px;
    }

    .minifinity-nav-btn {
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .minifinity-prev {
        top: 70px;
    }
}

@media (max-width: 480px) {
    .minifinity-actions {
        right: 8px;
        gap: 14px;
    }

    .minifinity-info {
        right: 50px;
        padding: 40px 12px 12px;
    }

    .minifinity-genre-tag {
        font-size: 10px;
        padding: 2px 7px;
    }
}
