/* ============ REELS PAGE STYLES ============ */

/* Hide elements not needed on reels page */
.reels-page .bubbles-carousel-wrap,
.reels-page .my-bets-section,
.reels-page .hero-strip-wrap {
    display: none !important;
}

/* Reels Carousel Container */
.reels-carousel-wrap {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 9/16;
    max-height: 80vh;
}

.reels-track {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.reels-track::-webkit-scrollbar {
    display: none;
}

/* Individual Reel Item */
.reel-item {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    scroll-snap-align: start;
    flex-shrink: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reel-video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

/* Reel Overlay Content - Avatar at Top Left */
.reel-overlay {
    position: absolute;
    top: 44px;
    left: 12px;
    right: auto;
    padding: 0;
    background: none;
    color: #fff;
    z-index: 6;
    pointer-events: auto;
}

.reel-overlay * {
    pointer-events: auto;
}

.reel-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    background: none;
    padding: 6px 14px 6px 6px;
    border-radius: 0;
    backdrop-filter: none;
    border: none;
}

.reel-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.reel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-avatar .initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #009933;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
}

.reel-author-name {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
}

.reel-author-name .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #1d9bf0;
    border-radius: 50%;
    margin-left: 4px;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
}

/* Reel Action Buttons (side) */
.reel-actions {
    position: absolute;
    right: 12px;
    bottom: 120px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 5;
}

.reel-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s;
    font-size: 12px;
}

.reel-action-btn:hover {
    transform: scale(1.1);
}

.reel-action-btn svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
}

.reel-action-btn .count,
.reel-action-btn .cnt {
    font-size: 12px;
    font-weight: 600;
}

/* Reel Controls */
.reel-controls {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 5;
}

.reel-control-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    backdrop-filter: blur(10px);
}

.reel-control-btn:hover {
    background: rgba(255,255,255,0.25);
}

.reel-control-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
}

/* Reel Progress Indicator */
.reel-progress {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 5;
    width: 60%;
}

.reel-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.reel-progress-bar .fill {
    height: 100%;
    background: #fff;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.reel-progress-bar.active .fill {
    animation: reelProgress 5s linear forwards;
}

@keyframes reelProgress {
    from { width: 0%; }
    to { width: 100%; }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .reels-carousel-wrap {
        max-width: 100%;
        border-radius: 0;
        max-height: calc(100vh - 120px);
        aspect-ratio: 9/16;
    }
    
       .reel-overlay {
        top: 38px;
        left: 10px;
        pointer-events: auto;
    }
    
       .reel-author {
        padding: 4px 10px 4px 4px;
        gap: 8px;
        background: none;
        border-radius: 0;
        backdrop-filter: none;
        border: none;
    }
    
    .reel-avatar {
        width: 28px;
        height: 28px;
    }
    
    .reel-author-name {
        font-size: 11px;
    }
    
      .reel-actions {
        bottom: 100px;
        right: 16px;
        gap: 14px;
    }
    
    .reel-action-btn svg {
        width: 24px;
        height: 24px;
    }
    
    .reel-controls {
        bottom: 60px;
        gap: 14px;
    }
    
    .reel-control-btn {
        width: 38px;
        height: 38px;
    }
    
    .reel-control-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Loading State */
.reel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #fff;
    font-size: 14px;
}

.reel-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.reel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #8e8e9a;
    text-align: center;
    padding: 40px;
}

.reel-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.reel-empty h3 {
    color: #fff;
    margin-bottom: 8px;
}

.reel-empty p {
    font-size: 14px;
}

/* Mute/Unmute Button */
.reel-mute-btn {
    position: absolute;
    top: 60px;
    right: 12px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(8px);
}

.reel-mute-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

.reel-mute-btn svg {
    width: 18px;
    height: 18px;
}

/* Muted state - show muted icon */
.reel-mute-btn.muted svg path:last-child {
    display: none;
}
.reel-mute-btn.unmuted svg path:last-child {
    display: block;
}

@media (max-width: 768px) {
    .reel-mute-btn {
        top: 50px;
        right: 10px;
        width: 32px;
        height: 32px;
    }
    .reel-mute-btn svg {
        width: 16px;
        height: 16px;
    }
}