:root {
    --hero-height: 240px;
    --hero-width: 96%;
    --accent-glow: #00f2ff;
}

@media (min-width: 1024px) {
    :root {
        --hero-height: 320px; 
        --hero-width: 580px; 
    }
}

.hero-wrapper { width: 100%; padding: 20px 0; background: #000; overflow: hidden; }

.hero-slider { 
    display: flex; 
    overflow-x: auto; 
    scroll-snap-type: x mandatory; 
    gap: 15px; 
    padding: 0 4%; 
    scrollbar-width: none; 
    align-items: center;
    scroll-behavior: smooth;
}
.hero-slider::-webkit-scrollbar { display: none; }

.hero-card {
    flex: 0 0 var(--hero-width);
    height: var(--hero-height);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    scroll-snap-align: center;
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: opacity 0.8s ease;
}

.video-preview { z-index: 2; opacity: 0.95; object-fit: cover; }

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    /* Restored the original gradient logic */
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    pointer-events: none;
}

/* TOP BAR RESTORED: League on Left, Timer on Right */
.hero-top-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hero-league-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
}

/* RESTORED: BLINKING RED LIVE TIMER */
.hero-timer {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 4px 10px;
    border-radius: 8px;
}

.pulse-live {
    color: #ff0000 !important; /* Back to pure Red */
    text-shadow: 0 0 8px rgba(255,0,0,0.6);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* MATCH ROW: Scores Prominence + Wrap Fix */
.hero-match-row { 
    display: flex; 
    align-items: center; 
    justify-content: space-around; 
    width: 100%; 
    transition: all 0.5s ease;
}

.hero-team-box { display: flex; flex-direction: column; align-items: center; width: 100px; }
.hero-logo-img { width: 55px; height: 55px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)); }
.hero-team-label { font-size: 0.85rem; font-weight: 600; margin-top: 8px; text-align: center; color: #fff; }

.hero-score-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    color: #ffffff !important; 
    text-shadow: 0 0 15px rgba(0,242,255,0.4);
    white-space: nowrap;
}

.hero-score-text.score-pop { animation: heroScorePop 0.5s ease; }
@keyframes heroScorePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); text-shadow: 0 0 20px #fff; }
    100% { transform: scale(1); }
}

/* DUAL-STATE LOGIC RESTORED */
.hero-card:not(.no-hero-img) .hero-match-row { transform: translateY(10px); }
.hero-card:not(.no-hero-img) .hero-team-label { display: none; }
.hero-card:not(.no-hero-img) .hero-team-box { opacity: 0.4; }
.hero-card:not(.no-hero-img) .hero-score-text { opacity: 1 !important; transform: translateY(-10px); }

.hero-card.no-hero-img .hero-match-row { opacity: 1; transform: translateY(0); }
.hero-card.no-hero-img .hero-media { opacity: 0.4; }
/* Navigation Arrows */
.hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: none; /* Hidden on mobile */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .hero-nav-btn { display: flex; }
}

.hero-nav-btn:hover { background: var(--accent-glow); color: #000; }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Video Interaction State */
.video-preview {
    opacity: 0;
    pointer-events: none;
}

/* Logic: Play when first loaded OR when holding */
.hero-card.initial-load .video-preview,
.hero-card.user-holding .video-preview {
    opacity: 1;
}
/* 1. Ensure Arrows are visible on Mobile (Override the display: none) */
@media (max-width: 1023px) {
    .hero-nav-btn {
        display: flex; /* Show arrows on mobile as requested */
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        background: rgba(0, 0, 0, 0.4);
    }
    .prev-btn { left: 8px; }
    .next-btn { right: 8px; }
}

/* 2. Transition for the Video Preview */
.video-preview {
    transition: opacity 0.5s ease-in-out;
    pointer-events: none; /* Prevents video from blocking clicks to the card */
}

/* 3. Handle the 'no-hero-img' state (Stable Logic) */
/* When an image is still loading or fails, we show the stadium placeholder or a darker background */
.hero-card.no-hero-img .hero-asset-img {
    opacity: 0;
}

.hero-card.no-hero-img {
    background-image: url('/assets/img/stadium_placeholder.jpg');
    background-size: cover;
    background-position: center;
}

/* 4. Center Box Logic (Keeps scores aligned) */
.hero-center-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.hero-status-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

/* 5. Improve PC Drag Cursor */
.hero-slider.active {
    cursor: grabbing;
}
/* Fix Arrow Centering */
.hero-wrapper {
    position: relative; /* Context for absolute positioning */
}

.hero-nav-btn {
    position: absolute;
    /* This centers it perfectly regardless of card height */
    top: 50%; 
    transform: translateY(-50%); 
    
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20; /* Ensure it stays above everything */
    display: flex; /* Force show on mobile/PC for now */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

/* Gold Glow Highlight */
.hero-nav-btn:hover, .hero-nav-btn:active {
    background: #FFD700; /* Gold */
    color: #000;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Ensure cards don't block arrows */
.hero-slider {
    padding: 0 50px; /* Gives arrows room to breathe */
}

/* FORCE TRANSPARENCY - Append to bottom of hero.css */

.hero-wrapper {
    background: transparent !important; /* Removes the black bar behind the cards */
    padding: 20px 0;
}

.hero-card {
    background: transparent !important; /* Removes the card's internal black box */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Keeps a subtle edge */
}

/* This handles the card before the image/video loads */
.hero-card.no-hero-img {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Fix for the video and image background */
.hero-media {
    background: transparent !important;
}

/* Ensure the slider itself doesn't have a background */
.hero-slider {
    background: transparent !important;
}
/* Make Hero Cards wider */
.hero-card {
  width: 92vw;       /* Increases width to 92% of the viewport */
  margin: 0 8px;     /* Small gap between cards */
  flex-shrink: 0;    /* Prevents cards from squishing */
  border-radius: 12px;
  overflow: hidden;
}

/* Ensure the wrapper handles the wider content */
#hero-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.hero-card {
  scroll-snap-align: center; /* Keeps the wide card centered */
}

/* Style for the Star Notification Popup (Toast) */
.notif-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  border: 1px solid #2ee6b7;
  font-size: 0.9rem;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

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