/* ============================================================
   DRAMICBOX — TIKTOK / REELS VERTICAL CLIPS & FEED (BETA V0.8.1)
   ============================================================ */

.reels-page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: #07070c;
    color: #fff;
    font-family: 'Outfit', 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 70px;
    box-sizing: border-box;
}

/* Feed Container */
.reels-feed-container {
    width: 100%;
    max-width: 440px;
    height: calc(100vh - 90px);
    max-height: 820px;
    min-height: 520px;
    position: relative;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    border-radius: 26px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0a0a10;
}

/* Hide default scrollbar */
.reels-feed-container::-webkit-scrollbar {
    display: none;
}
.reels-feed-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Individual Reel Card */
.reel-item {
    position: relative;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    user-select: none;
}

/* Video Player */
.reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    background: #000;
}

/* Gradient Overlays for readable text */
.reel-gradient-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 110px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

.reel-gradient-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    pointer-events: none;
    z-index: 5;
}

/* Top Bar Info */
.reel-top-bar {
    position: absolute;
    top: 14px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.reel-badge-pill {
    background: rgba(124, 58, 237, 0.35);
    border: 1px solid rgba(167, 139, 250, 0.4);
    backdrop-filter: blur(10px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #e9d5ff;
}

.reel-sound-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}
.reel-sound-toggle:hover {
    background: rgba(124, 58, 237, 0.6);
    transform: scale(1.08);
}

/* Right Side Actions Bar */
.reel-actions-bar {
    position: absolute;
    right: 12px;
    bottom: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    z-index: 15;
}

.reel-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.reel-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.reel-action-btn.liked .reel-action-icon {
    background: rgba(236, 72, 153, 0.25);
    border-color: rgba(236, 72, 153, 0.6);
    color: #f43f5e;
}

.reel-action-btn span {
    font-size: 0.72rem;
    font-weight: 700;
    color: #e2e8f0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Bottom Content Info & Series Jump Card */
.reel-bottom-info {
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 75px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Series Link Card */
.reel-series-card {
    background: rgba(20, 20, 35, 0.82);
    border: 1px solid rgba(167, 139, 250, 0.35);
    backdrop-filter: blur(14px);
    padding: 8px 12px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    width: fit-content;
    max-width: 100%;
}

.reel-series-card:hover {
    background: rgba(124, 58, 237, 0.35);
    border-color: rgba(192, 132, 252, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

.reel-series-poster {
    width: 32px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: #1e1e2d;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reel-series-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.reel-series-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.reel-series-action {
    font-size: 0.72rem;
    font-weight: 700;
    color: #a78bfa;
    display: flex;
    align-items: center;
    gap: 4px;
}

.reel-caption-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.reel-caption-desc {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.45;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Double-Tap Heart Animation */
.reel-heart-pop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5.5rem;
    color: #f43f5e;
    pointer-events: none;
    z-index: 30;
    animation: heartPopAnim 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    filter: drop-shadow(0 0 25px rgba(244, 63, 94, 0.8));
}

@keyframes heartPopAnim {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.2) rotate(-15deg);
    }
    40% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3) rotate(0deg);
    }
    70% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -80%) scale(0.9) rotate(-10deg);
    }
}

/* Desktop Navigation Arrows (Prev / Next) */
.reels-nav-controls {
    position: absolute;
    right: calc(50% - 280px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 20;
}

.reels-nav-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(22, 22, 34, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
}

.reels-nav-arrow:hover {
    background: rgba(124, 58, 237, 0.4);
    border-color: rgba(167, 139, 250, 0.5);
    transform: scale(1.1);
}

/* Mobile Fullscreen Override */
@media (max-width: 768px) {
    .reels-page-wrapper {
        padding-top: 0;
        padding-bottom: 0;
        height: calc(100dvh - 60px - var(--bottom-nav-height, 68px));
        min-height: calc(100dvh - 60px - var(--bottom-nav-height, 68px));
        max-height: calc(100dvh - 60px - var(--bottom-nav-height, 68px));
        overflow: hidden;
        box-sizing: border-box;
        position: relative;
        background: #000;
    }
    .reels-feed-container {
        width: 100vw;
        max-width: 100vw;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
        scroll-snap-type: y mandatory;
        overflow-y: scroll;
        box-sizing: border-box;
        background: #000;
    }
    .reel-item {
        width: 100vw;
        height: 100%;
        min-height: 100%;
        max-height: 100%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        position: relative;
        overflow: hidden;
        box-sizing: border-box;
    }
    .reels-nav-controls {
        display: none !important;
    }
    .reel-bottom-info {
        bottom: 14px;
        left: 12px;
        right: 68px;
        gap: 6px;
    }
    .reel-actions-bar {
        bottom: 16px;
        right: 10px;
        gap: 12px;
    }
    .reel-action-icon {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }
    .reel-series-card {
        padding: 6px 10px;
        gap: 8px;
        border-radius: 12px;
    }
    .reel-series-poster {
        width: 28px;
        height: 38px;
    }
    .reel-series-title {
        font-size: 0.8rem;
    }
    .reel-series-action {
        font-size: 0.68rem;
    }
    .reel-caption-title {
        font-size: 0.88rem;
        line-height: 1.3;
    }
    .reel-caption-desc {
        font-size: 0.74rem;
        -webkit-line-clamp: 2;
    }
    .reel-ost-pill {
        margin-top: 4px;
        padding: 3px 10px 3px 5px;
        max-width: 90%;
    }
    .reel-ost-disc {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }
    .reel-ost-text {
        font-size: 0.7rem;
    }
}

/* ============================================================
   UGC (USER GENERATED CLIPS) & OST CARD ENHANCEMENTS
   ============================================================ */

/* UGC Submit Button */
.reel-submit-ugc-btn {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    border: none;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.reel-submit-ugc-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

/* Uploader Tag */
.reel-uploader-tag {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.reel-uploader-tag i {
    color: #f472b6;
}

/* OST Spinning Disc Pill */
.reel-ost-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 15, 25, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    padding: 4px 12px 4px 6px;
    border-radius: 20px;
    margin-top: 8px;
    cursor: pointer;
    max-width: 85%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}
.reel-ost-pill:hover {
    background: rgba(124, 58, 237, 0.35);
    border-color: rgba(167, 139, 250, 0.45);
    transform: translateY(-2px);
}

.reel-ost-disc {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #1e1026 25%, #000 65%, #333 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f472b6;
    font-size: 0.95rem;
    animation: spinVinyl 3.5s linear infinite;
    flex-shrink: 0;
}
@keyframes spinVinyl {
    100% { transform: rotate(360deg); }
}

.reel-ost-ticker {
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
}
.reel-ost-text {
    font-size: 0.74rem;
    font-weight: 700;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.reel-ost-text i {
    color: #a78bfa;
}
