/* ═══════════════════════════════════════════════════════════
   ULTRAGOL REELS — TikTok-style viewer for football clips
   ═══════════════════════════════════════════════════════════ */

:root {
    --reels-primary: #e94560;
    --reels-glow: rgba(233, 69, 96, 0.6);
    --reels-bg: #000;
    --reels-text: #fff;
}

/* ─────────────────────────────────────────────
   CENTER NAV REELS BUTTON (green + pink, elevated)
   Lives between regular nav-btns in the bottom nav
   ───────────────────────────────────────────── */
.nav-reels-btn {
    position: relative;
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    margin: -22px 8px 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    z-index: 5;
    font-family: inherit;
}

/* Pink-green gradient ring (rotating) */
.nav-reels-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #ff3b8b 0%,
        #00ff95 25%,
        #ff3b8b 50%,
        #00ff95 75%,
        #ff3b8b 100%
    );
    animation: reelsRingSpin 3s linear infinite;
    padding: 3px;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
}

/* Outer glow halo */
.nav-reels-glow {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 59, 139, 0.55) 0%, rgba(0, 255, 149, 0.25) 50%, transparent 70%);
    filter: blur(8px);
    animation: reelsGlowPulse 1.8s ease-in-out infinite;
    z-index: -1;
}

/* Inner icon disc */
.nav-reels-icon {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff3b8b 0%, #b91d73 35%, #00cc7a 65%, #00ff95 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.2),
        0 6px 16px rgba(255, 59, 139, 0.5),
        0 8px 22px rgba(0, 255, 149, 0.35);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.nav-reels-icon i {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
    animation: reelsIconBolt 1.2s ease-in-out infinite alternate;
}

/* Tiny "REELS" label below */
.nav-reels-label {
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #fff;
    background: linear-gradient(90deg, #ff3b8b, #00ff95);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 12px rgba(255, 59, 139, 0.5);
    pointer-events: none;
    white-space: nowrap;
}

.nav-reels-btn:hover .nav-reels-icon {
    transform: scale(1.1) rotate(-8deg);
}

.nav-reels-btn:active .nav-reels-icon {
    transform: scale(0.92);
}

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

@keyframes reelsGlowPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.18); }
}

@keyframes reelsIconBolt {
    0% { transform: scale(1) rotate(-4deg); }
    100% { transform: scale(1.15) rotate(4deg); }
}

@keyframes fireDance {
    0% { transform: scale(1) rotate(-3deg); }
    100% { transform: scale(1.15) rotate(3deg); }
}

/* ─────────────────────────────────────────────
   INLINE TEASER SECTION (in home page)
   ───────────────────────────────────────────── */
.reels-teaser {
    position: relative;
    z-index: 2;
    padding: 60px 24px 40px;
    max-width: 1280px;
    margin: 0 auto;
}

.reels-teaser-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.reels-teaser-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.reels-teaser-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0;
    background: linear-gradient(90deg, #fff 0%, #e94560 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reels-teaser-fire {
    font-size: 1.8rem;
    animation: fireDance 1.2s ease-in-out infinite alternate;
    display: inline-block;
}

.reels-teaser-new-badge {
    background: linear-gradient(135deg, #00ff41 0%, #00cc33 100%);
    color: #000;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 5px 12px;
    border-radius: 50px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(0, 255, 65, 0.4);
}

.reels-teaser-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e94560;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: gap 0.2s;
    background: none;
    border: none;
    font-family: inherit;
}

.reels-teaser-cta:hover { gap: 14px; }

.reels-teaser-scroller {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 4px 24px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.reels-teaser-scroller::-webkit-scrollbar { display: none; }

.reels-card {
    flex: 0 0 200px;
    aspect-ratio: 9 / 16;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    scroll-snap-align: start;
    background: #111;
    border: 2px solid rgba(255,255,255,0.06);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.reels-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--reels-primary);
    box-shadow: 0 16px 40px rgba(233, 69, 96, 0.4);
}

.reels-card-thumb {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.reels-card:hover .reels-card-thumb { transform: scale(1.1); }

.reels-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
}

.reels-card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #000;
    background: #FFD700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.reels-card-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s;
}

.reels-card:hover .reels-card-play { opacity: 1; }

.reels-card-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 14px;
    color: #fff;
}

.reels-card-team {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.reels-card-title {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reels-card-stats {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
}

.reels-card-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ─────────────────────────────────────────────
   FULLSCREEN VIEWER (TikTok-style)
   ───────────────────────────────────────────── */
.reels-viewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--reels-bg);
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.reels-viewer.active {
    display: flex;
    opacity: 1;
}

.reels-viewer-stage {
    flex: 1;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.reels-viewer-stage::-webkit-scrollbar { display: none; }

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

.reels-video-wrap {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.reels-video-wrap iframe,
.reels-video-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.reels-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--reels-primary);
    font-size: 2rem;
}

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

.reels-loading i { animation: spin 1s linear infinite; }

/* Top bar */
.reels-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 16px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.reels-topbar > * { pointer-events: auto; }

.reels-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.reels-brand-fire {
    color: var(--reels-primary);
    animation: fireDance 1.5s ease-in-out infinite alternate;
}

.reels-close {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.reels-close:hover {
    background: rgba(233, 69, 96, 0.8);
    transform: rotate(90deg);
}

/* Progress dots (vertical, left side) */
.reels-progress {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.reels-progress-dot {
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: rgba(255,255,255,0.25);
    transition: all 0.3s;
}

.reels-progress-dot.active {
    background: #fff;
    height: 28px;
    box-shadow: 0 0 12px rgba(255,255,255,0.6);
}

/* Right action buttons (like TikTok) */
.reels-actions {
    position: absolute;
    right: 16px;
    bottom: 140px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 10;
}

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

.reels-action-btn:hover { transform: scale(1.15); }
.reels-action-btn:active { transform: scale(0.92); }

.reels-action-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s;
}

.reels-action-btn.liked .reels-action-icon {
    background: var(--reels-primary);
    color: #fff;
    box-shadow: 0 0 24px var(--reels-glow);
    animation: heartPop 0.4s ease;
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.reels-action-count {
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.reels-mute-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.reels-mute-btn:hover { background: rgba(233, 69, 96, 0.7); }

/* Bottom info overlay */
.reels-info {
    position: absolute;
    left: 0; right: 80px;
    bottom: 0;
    padding: 24px 20px 32px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    color: #fff;
    z-index: 5;
}

.reels-info-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.reels-info-team {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.95);
}

.reels-info-team i { color: var(--reels-primary); }

.reels-info-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.reels-info-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
}

.reels-info-date {
    margin-top: 10px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
}

/* Swipe hint (shown only on first slide) */
.reels-swipe-hint {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 6;
    pointer-events: none;
    animation: swipeUp 1.6s ease-in-out infinite;
}

@keyframes swipeUp {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.7; }
    50% { transform: translateX(-50%) translateY(-12px); opacity: 1; }
}

/* Toast for share */
.reels-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 12px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 100000;
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
}

.reels-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .reels-fab {
        right: 12px;
        padding: 14px 10px;
    }

    .reels-fab .reels-fab-icon { font-size: 20px; }
    .reels-fab .reels-fab-text { font-size: 10px; }

    .reels-card { flex: 0 0 160px; }

    .reels-actions {
        right: 10px;
        bottom: 120px;
        gap: 18px;
    }

    .reels-action-icon { width: 44px; height: 44px; font-size: 1.2rem; }

    .reels-info { right: 70px; padding: 20px 16px 28px; }

    .reels-teaser { padding: 40px 16px 30px; }
}

@media (max-width: 480px) {
    .reels-card { flex: 0 0 140px; }
}

/* Hide FAB when viewer is open */
body.reels-viewer-open .reels-fab { display: none; }
body.reels-viewer-open { overflow: hidden; }
