/* Instagram-Style Reels CSS - Premium Dark Theme */

.reel-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    background-color: #000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    overscroll-behavior: none;
}

.reel-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    background: #000;
    overscroll-behavior: contain;
}

.reel-container::-webkit-scrollbar {
    display: none;
}

.reel-item {
    width: 100%;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.reel-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    overflow: hidden;
    border-radius: 12px;
}

@media (max-width: 576px) {
    .reel-content-wrapper {
        border-radius: 0;
    }
}

.reel-video-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.reel-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Base Gradient for text legibility */
.reel-video-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

/* Sidebar Actions */
.reel-sidebar {
    position: absolute;
    right: 12px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.reel-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reel-action-item:hover {
    transform: scale(1.1);
}

.reel-action-item i {
    font-size: 26px;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.reel-action-count {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.heart-active {
    color: #ff3040 !important;
}

.bookmark-active {
    color: #ffd700 !important;
}

/* Info Footer */
.reel-info-footer {
    position: absolute;
    bottom: 80px;
    left: 16px;
    right: 60px;
    color: #fff;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reel-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reel-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.reel-author-name {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.reel-follow-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    border-radius: 8px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.reel-follow-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.reel-caption {
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    max-height: 100px;
    overflow-y: auto;
    scrollbar-width: none;
}

/* Central Indicator Overlay */
.reel-playback-control {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 5;
}

.reel-playback-control.visible {
    opacity: 1;
}

.reel-center-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.reel-center-controls.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

.reel-center-controls.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.reel-control-btn {
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.reel-mini-btn {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.reel-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
}

/* Comment Sheet */
.reel-comment-sheet {
    width: 100%;
    max-width: 480px;
    height: 75vh;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #fff;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.reel-comment-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reel-comment-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;

}

.reel-comment-footer {
    padding: 16px;
    background: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loader */
.reel-loader-sentinel {
    background: #000;
    padding: 40px 0;
    display: flex;
    justify-content: center;
}

.spinner-premium {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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