:root {
    --bg-color: #080808;
    --card-bg: #111111;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent: #e6b800; /* World Cup Gold */
    --live-color: #ff0033; /* Live Red */
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-text {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 5px;
    color: var(--accent);
    animation: pulse 2s infinite;
    text-align: center;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
    letter-spacing: 2px;
}

.text-accent {
    color: var(--accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--accent);
}

/* Hero Section (Match of the Day) */
.hero-sports {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 0 5%;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.2);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 2;
    margin-top: 50px;
}

.live-badge {
    background: rgba(255,0,51,0.2);
    border: 1px solid var(--live-color);
    color: var(--live-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.9rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--live-color);
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.match-display {
    display: flex;
    align-items: center;
    gap: 50px;
    margin: 30px 0;
}

.team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.team-flag {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.team-name {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 5px 15px rgba(230,184,0,0.3);
}

.score-divider {
    color: white;
    font-size: 3rem;
}

.match-context {
    font-size: 1.2rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.magnetic-btn {
    background: var(--accent);
    border: none;
    color: #000;
    padding: 18px 45px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.magnetic-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(230,184,0,0.4);
}

.magnetic-btn i {
    font-size: 1.4rem;
}

/* Matches Layout */
.content-main {
    padding: 50px 5%;
}

.editorial-genres {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 40px;
    overflow-x: auto;
    scrollbar-width: none;
}

.genre-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    padding-bottom: 15px;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.genre-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--accent);
    transition: var(--transition);
}

.genre-link.active, .genre-link:hover {
    color: white;
}

.genre-link.active::after, .genre-link:hover::after {
    width: 100%;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* Match Cards Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.match-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.match-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.status.live {
    color: var(--live-color);
    animation: blink 2s infinite;
}

.match-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mc-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.mc-flag {
    font-size: 3rem;
}

.mc-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.mc-score {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    padding: 0 15px;
}

.mc-vs {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 0 20px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    background: #000;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.4s ease;
    border: 1px solid rgba(230,184,0,0.2);
    border-radius: 10px;
    overflow: hidden;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close-btn:hover {
    background: var(--accent);
    color: #000;
}

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    background: #000;
}

#yunon-player {
    width: 100%;
    height: 100%;
    outline: none;
}

.yunon-watermark {
    position: absolute;
    top: 20px;
    left: 20px; /* moved to left so close button is on right */
    color: rgba(255, 255, 255, 0.4);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 2px;
    pointer-events: none;
    text-shadow: 0 2px 5px rgba(0,0,0,1);
    z-index: 10;
}

.video-info-bar {
    padding: 20px 30px;
    background: #0a0a0a;
    border-top: 1px solid rgba(230,184,0,0.2);
    display: flex;
    align-items: center;
    gap: 20px;
}

.live-badge-small {
    background: var(--live-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: 900;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

#modal-movie-title {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-right: auto;
}

.video-info-bar p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Monetization / Ad Banners */
.ad-banner {
    width: 100%;
    background: #1a1a1a;
    border: 1px dashed var(--accent);
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    margin: 30px 0;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
    border-radius: 8px;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    body, html { width: 100%; overflow-x: hidden; }
    
    .navbar { padding: 15px 5%; }
    .logo { font-size: 1.2rem; }
    
    .hero-sports { min-height: 100svh; padding: 0 15px; }
    .hero-content { margin-top: 80px; width: 100%; }
    
    /* Perfect Center Scoreboard with CSS Grid */
    .match-display { 
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 5px;
        width: 100%;
        max-width: 100%;
        margin: 20px 0;
    }
    .team { 
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px; 
    }
    .team-flag { font-size: 2.2rem; line-height: 1; margin: 0; }
    .team-name { font-size: 0.75rem; text-align: center; word-wrap: break-word; line-height: 1.2; }
    
    .score-display { 
        font-size: 2rem; 
        padding: 0 10px;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    .score-divider { font-size: 1.5rem; }
    
    .match-context { font-size: 0.9rem; margin-bottom: 20px; text-align: center; }
    
    .magnetic-btn { 
        padding: 15px 20px; 
        font-size: 0.9rem; 
        width: 100%; 
        max-width: 300px;
        justify-content: center; 
    }
    
    .content-main { padding: 30px 15px; }
    .matches-grid { grid-template-columns: 1fr; gap: 15px; }
    .match-card { padding: 15px; }
    .mc-flag { font-size: 2rem; }
    .mc-score { font-size: 1.8rem; padding: 0 10px; }
    .mc-name { font-size: 0.9rem; }
    
    /* Bulletproof Video Modal for Mobile */
    .modal-overlay { 
        padding: 0; 
        align-items: center; /* Center vertically in HP */
        background: #000; /* Full black background on HP */
    }
    .modal-content { 
        width: 100vw; 
        height: auto; 
        max-width: none;
        border: none;
        border-radius: 0;
        margin: 0;
        transform: scale(1) !important;
    }
    .video-container { 
        width: 100vw; 
        aspect-ratio: 16/9; 
        max-height: 100vh;
    }
    .video-info-bar { 
        padding: 15px; 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 10px; 
    }
    #modal-movie-title { font-size: 1.1rem; }
    .yunon-watermark { top: 10px; left: 10px; font-size: 0.8rem; }
    .close-btn { 
        top: -45px; /* Push outside the video frame if possible, or inside */
        right: 10px; 
        width: 35px; 
        height: 35px; 
        font-size: 1.2rem;
        background: rgba(255,0,0,0.7);
    }
    /* We make sure close button sits inside the screen */
    .modal-content { position: relative; padding-top: 50px; background: #000; }
    .close-btn { top: 10px; right: 10px; z-index: 999; }
}

@media (max-width: 480px) {
    .splash-text { font-size: 1.8rem; letter-spacing: 3px; text-align: center; }
    .team-flag { font-size: 1.8rem; }
    .score-display { font-size: 1.8rem; }
    .team-name { font-size: 0.7rem; }
    .hero-sports { min-height: 100vh; }
}

@media (max-width: 380px) {
    .team-flag { font-size: 2.2rem; }
    .score-display { font-size: 2rem; }
    .team-name { font-size: 0.75rem; }
}

/* Live Player UI Enhancements */
.pulse-red {
    animation: pulse-red 1.5s infinite;
    background: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(255, 0, 0, 0.8); }
    100% { transform: scale(1); box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); }
}

.live-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #fff;
    margin-left: auto;
}
.live-stats i {
    color: var(--accent);
}

.video-info-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    flex-wrap: wrap;
}
