
/* style.css - تصميم "شاهد كورة" - Ultimate Pitch UI - الإصدار الاحترافي والعصري (تعديل 3) */

/* --- Root Variables for Theme Customization (Lighter & Trendy - Red Accent) --- */
:root {
    /* Backgrounds - Moved to warmer, slightly off-white tones */
    --up-bg-light: #F7F9FA; /* Very light, almost white, subtle warmth */
    --up-bg-medium: #EFF2F5; /* Light gray for cards/sections, softer than white */
    --up-bg-dark: #E1E7ED; /* Deeper light gray for subtle depth/borders */

    /* Accents - Retained vibrant Red and Blue */
    --up-accent-primary: #FF3B3B; /* Vibrant Red - Main accent, powerful */
    --up-accent-secondary: #007BFF; /* Bright Blue - Secondary accent, contrasting */
    --up-accent-warning: #FFC107; /* Orange/Yellow - For upcoming/highlights */
    --up-accent-success: #28A745; /* Green - For positive elements/glows */
    --up-accent-danger: #DC3545; /* Specific danger red for 'live' status */

    /* Text Colors */
    --up-text-dark: #2C3A47; /* Dark charcoal for primary text */
    --up-text-medium: #5F6E7D; /* Medium gray for secondary text */
    --up-text-light: #8E9BAA; /* Lighter gray for muted text */
    --up-text-on-accent: #FFFFFF; /* White text for accent backgrounds */

    /* Gradients & Shadows */
    --up-gradient-btn-primary: linear-gradient(45deg, var(--up-accent-primary) 0%, var(--up-accent-secondary) 100%);
    --up-gradient-btn-hover: linear-gradient(45deg, var(--up-accent-secondary) 0%, var(--up-accent-primary) 100%);
    --up-gradient-header: linear-gradient(to bottom, rgba(247, 249, 250, 0.98), rgba(239, 242, 245, 0.95)); /* Adjusted for new light background */
    
    --up-shadow-soft: 0 4px 10px rgba(0, 0, 0, 0.08); /* Lighter shadows */
    --up-shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.12);
    --up-shadow-strong: 0 12px 30px rgba(0, 0, 0, 0.18);
    --up-glow-primary: 0 0 15px rgba(255, 59, 59, 0.5), 0 0 25px rgba(255, 59, 59, 0.3); /* Slightly less intense glow */
    --up-glow-secondary: 0 0 15px rgba(0, 123, 255, 0.5), 0 0 25px rgba(0, 123, 255, 0.3);
    --up-inset-shadow: inset 0 0 6px rgba(0, 0, 0, 0.03); /* Very subtle inset shadow */

    /* Typography */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease-out;
    --transition-medium: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.7s cubic-bezier(0.4, 0, 0.2, 1);

    /* Borders & Radius */
    --border-radius-card: 10px;
    --border-radius-button: 6px;
    --border-radius-full: 50%;

    /* Aspect Ratio for video player */
    --aspect-ratio-16-9: 16 / 9;
}

/* --- Base Reset & Global Styles (Mobile First Defaults) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 13px; 
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background-color: var(--up-bg-light); 
    color: var(--up-text-dark); 
    line-height: 1.6;
    direction: rtl; 
    text-align: right; 
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    overflow-y: scroll;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}
i {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

:focus-visible {
    outline: 2px solid var(--up-accent-primary);
    outline-offset: 3px;
    border-radius: var(--border-radius-button);
}

/* Custom Scrollbar (Adjusted for light theme) */
body::-webkit-scrollbar {
    width: 8px;
}
body::-webkit-scrollbar-track {
    background: var(--up-bg-light);
}
body::-webkit-scrollbar-thumb {
    background: var(--up-accent-primary); /* Red thumb */
    border-radius: 4px;
    border: 2px solid var(--up-bg-light);
}
body::-webkit-scrollbar-thumb:hover {
    background: var(--up-accent-secondary); /* Blue hover */
}

/* Background texture overlay - Adjusted opacity and color for light theme */
.pitch-texture-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(45deg, rgba(0,0,0,0.01) 0, rgba(0,0,0,0.01) 1px, transparent 1px, transparent 60px),
        repeating-linear-gradient(-45deg, rgba(0,0,0,0.01) 0, rgba(0,0,0,0.01) 1px, transparent 1px, transparent 60px);
    background-color: var(--up-bg-light); /* Ensure it matches the light theme */
    background-size: 60px 60px;
    opacity: 1; /* Keep it subtle */
    z-index: -2;
    filter: brightness(1.0);
}

.site-wrapper {
    position: relative;
    z-index: 1;
}

.container {
    width: 95vw;
    max-width: 1280px;
    margin: auto;
    padding: 0 1rem;
}

a {
    color: var(--up-accent-primary); /* Primary red link color */
    text-decoration: none;
    transition: all var(--transition-fast);
}
a:hover {
    color: var(--up-accent-secondary); /* Secondary blue on hover */
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(255, 59, 59, 0.3);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 2.5vw, 0.9rem); 
    border-radius: var(--border-radius-button);
    transition: all var(--transition-medium);
    box-shadow: var(--up-shadow-soft);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    font-weight: 700;
    border: 2px solid transparent;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1); 
    transform: translateZ(0);
    perspective: 1000px;
}

.btn-primary {
    background: var(--up-gradient-btn-primary);
    color: var(--up-text-on-accent); /* White text on primary gradient */
}
.btn-primary:hover {
    background: var(--up-gradient-btn-hover);
    transform: translateY(-2px) scale(1.005) rotateX(5deg);
    box-shadow: var(--up-glow-primary), 0 0 20px var(--up-accent-secondary);
    border-color: var(--up-accent-secondary);
    color: var(--up-text-on-accent);
    text-shadow: none;
}

.btn-secondary {
    background: var(--up-bg-medium);
    color: var(--up-accent-primary); /* Primary red text */
    border-color: var(--up-accent-primary);
}
.btn-secondary:hover {
    background: var(--up-accent-primary);
    color: var(--up-text-on-accent); /* White text on primary background */
    border-color: var(--up-accent-secondary);
    transform: translateY(-1px) rotateX(3deg);
    box-shadow: var(--up-glow-primary);
}

.btn-tertiary { /* Added for news card link */
    background: var(--up-bg-dark);
    color: var(--up-text-dark);
    border: 1px solid var(--up-bg-dark);
    box-shadow: var(--up-inset-shadow);
}
.btn-tertiary:hover {
    background: var(--up-accent-secondary);
    color: var(--up-text-on-accent);
    border-color: var(--up-accent-secondary);
    box-shadow: var(--up-glow-secondary);
}


/* Shimmer effect for all buttons on hover */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left var(--transition-medium) ease-out;
}
.btn:hover::before {
    left: 120%;
}

.btn i {
    margin-right: 0.4rem;
}
/* RTL adjustment for icons in buttons */
.btn-secondary.back-btn i {
    margin-left: 0.4rem;
    margin-right: 0;
    transform: rotate(180deg);
}
.btn-page.prev i {
    margin-left: 0.4rem;
    margin-right: 0;
    transform: rotate(180deg);
}
.btn-page.next i {
    margin-left: 0;
    margin-right: 0.4rem;
}
.btn-tertiary i {
    margin-left: 0.4rem;
    margin-right: 0;
    transform: rotate(180deg);
}


/* --- Header (Navbar) --- */
.main-header {
    background: var(--up-gradient-header);
    backdrop-filter: blur(12px);
    color: var(--up-text-dark);
    padding: 0.7rem 0;
    border-bottom: 2px solid var(--up-accent-primary); /* Primary red border */
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--up-shadow-medium);
    transition: all var(--transition-medium);
}

.main-header .header-content {
    display: flex;
    flex-wrap: nowrap; /* Default: no wrap */
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    padding: 0 1rem;
}

/* Site Logo */
.site-logo {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.2vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.8px;
    flex-shrink: 0;
    text-transform: uppercase;
    transition: all var(--transition-medium);
    position: relative;
    color: var(--up-accent-primary); /* Red accent for logo text */
    text-shadow: 0 0 8px rgba(255, 59, 59, 0.2), 0 0 15px rgba(0, 123, 255, 0.15);
}

.site-logo .logo-icon {
    font-size: 0.65em;
    color: var(--up-accent-secondary); /* Blue accent for icon */
    margin-left: 0.1em;
    margin-right: 0;
    vertical-align: middle;
    line-height: 1;
}

/* Main Navigation (Desktop styles) */
.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
.main-nav ul {
    list-style: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    margin: 0;
}
.main-nav ul li {
    margin: 0 1rem;
    position: relative;
    list-style: none;
}
.main-nav ul li a {
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 0.85vw, 0.95rem);
    padding: 0.7rem 1.4rem;
    border-radius: var(--border-radius-button);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
    font-weight: 600;
    color: var(--up-text-medium);
    text-shadow: 0 0 3px rgba(0,0,0,0.2);
    background: var(--up-bg-medium);
    border: 1px solid rgba(255, 59, 59, 0.2); /* Primary accent border */
    backdrop-filter: blur(6px);
}
.main-nav ul li a::before {
    background: var(--up-gradient-btn-primary);
    box-shadow: 0 0 8px var(--up-accent-primary), 0 0 15px var(--up-accent-secondary);
}
.main-nav ul li a:hover, .main-nav ul li a.active {
    background: var(--up-accent-primary);
    color: var(--up-text-on-accent);
    box-shadow: var(--up-glow-primary);
    border-color: var(--up-accent-secondary);
    transform: translateY(-1px) scale(1.003);
    text-shadow: none;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--up-bg-medium);
    border-radius: var(--border-radius-button);
    padding: 0.4rem 0.7rem;
    box-shadow: var(--up-inset-shadow);
    border: 1px solid var(--up-accent-primary);
    transition: all var(--transition-fast);
    backdrop-filter: blur(6px);
    order: 2;
}
.search-bar:focus-within {
    border-color: var(--up-accent-secondary);
    box-shadow: 0 0 8px var(--up-accent-secondary), var(--up-inset-shadow);
}
.search-bar input {
    padding: 0.5rem 0.7rem;
    border: none;
    background: transparent;
    color: var(--up-text-dark);
    margin-right: 0.5rem;
    outline: none;
    width: clamp(140px, 12vw, 200px);
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 0.8vw, 0.9rem);
    transition: all var(--transition-fast);
}
.search-bar input::placeholder {
    color: var(--up-text-light);
    opacity: 0.8;
}
.search-bar input:focus {
    color: var(--up-accent-primary);
    transform: scale(1.003);
}
.search-bar button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--up-accent-primary);
    font-size: 1.1rem;
    padding: 0.3rem;
    transition: all var(--transition-fast);
}
.search-bar button:hover {
    color: var(--up-accent-secondary);
    transform: scale(1.08);
    filter: drop-shadow(0 0 6px var(--up-accent-secondary));
}

/* Mobile menu toggle (Three bars icon) */
.menu-toggle {
    display: none; /* Default to hidden on desktop */
    font-size: 1.8rem;
    padding: 0.3rem 0.6rem;
    color: var(--up-accent-secondary);
    border: 1px solid var(--up-accent-secondary);
    border-radius: var(--border-radius-button);
    box-shadow: var(--up-shadow-soft);
    cursor: pointer;
    flex-shrink: 0;
    order: 0;
    margin-right: auto;
}


/* --- Main Content Display Area --- */
.view-section {
    padding: 7vw 0;
    background-color: var(--up-bg-light); 
    min-height: 50vh;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-medium), transform var(--transition-medium);
    position: relative;
    z-index: 1;
}
.view-section.active-view {
    opacity: 1;
    transform: translateY(0);
}

.view-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(45deg, rgba(0,0,0,0.01) 0, rgba(0,0,0,0.01) 1px, transparent 1px, transparent 20px),
        repeating-linear-gradient(-45deg, rgba(0,0,0,0.01) 0, rgba(0,0,0,0.01) 1px, transparent 1px, transparent 20px);
    background-size: 20px 20px;
    opacity: 0.1;
    z-index: 0;
    animation: inner-pattern-flow 20s linear infinite alternate;
}
@keyframes inner-pattern-flow {
    from { background-position: 0 0; }
    to { background-position: 200px 200px; }
}


.section-title {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 4vw;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    color: var(--up-accent-primary);
    text-shadow: 0 0 12px rgba(255, 59, 59, 0.3), 0 0 25px rgba(0, 123, 255, 0.15);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--up-accent-secondary);
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* Filter Controls */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 4vw;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    background: var(--up-bg-medium);
    border-radius: var(--border-radius-button);
    box-shadow: var(--up-inset-shadow);
    border: 1px solid var(--up-accent-primary);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(6px);
    position: relative;
    z-index: 1;
}

.filter-btn {
    background: rgba(255, 59, 59, 0.08); /* Light accent primary background */
    color: var(--up-text-dark);
    border: 1px solid var(--up-accent-primary);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-button);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 0 4px rgba(0,0,0,0.1);
    box-shadow: var(--up-shadow-soft);
    flex-shrink: 0;
}
.filter-btn:hover:not(.active), .filter-btn.active {
    background: var(--up-accent-primary);
    color: var(--up-text-on-accent);
    box-shadow: var(--up-glow-primary);
    border-color: var(--up-accent-secondary);
    transform: translateY(-2px);
    text-shadow: none;
}

.filter-dropdown {
    background: var(--up-bg-medium);
    color: var(--up-text-dark);
    border: 1px solid var(--up-accent-primary);
    padding: 0.6rem 1.4rem;
    border-radius: var(--border-radius-button);
    font-family: var(--font-body);
    font-size: clamp(0.85rem, 0.9vw, 0.95rem);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235F6E7D'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e"); /* Darker arrow for light background */
    background-repeat: no-repeat;
    background-position: left 0.8rem center;
    background-size: 0.9em;
    padding-left: 2rem;
    transition: all var(--transition-fast);
    box-shadow: var(--up-inset-shadow);
    backdrop-filter: blur(6px);
    flex-shrink: 0;
}
.filter-dropdown:hover, .filter-dropdown:focus {
    border-color: var(--up-accent-secondary);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.6);
    transform: translateY(-1px);
}

/* Grids for content cards */
.match-grid, .news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Adjusted minmax for mobile cards (wider) */
    gap: 1.5vw;
    padding: 0 1vw;
    position: relative;
    z-index: 1;
}

/* Empty State Message */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px 15px;
    background-color: var(--up-bg-medium);
    border-radius: var(--border-radius-card);
    box-shadow: var(--up-shadow-soft);
    border: 1px solid var(--up-accent-primary);
    margin-top: 15px;
    backdrop-filter: blur(8px);
    animation: fadeIn var(--transition-medium) ease-out;
}
.empty-state p {
    font-family: var(--font-heading);
    font-size: clamp(0.9rem, 1vw, 1rem);
    line-height: 1.4;
    margin-bottom: 10px;
    text-shadow: 0 0 3px rgba(0,0,0,0.1);
}
.empty-state button {
    margin-top: 8px;
}

/* --- Match Card Design --- */
.match-card {
    background: var(--up-bg-medium);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--up-shadow-soft);
    transition: all var(--transition-medium);
    cursor: pointer;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 59, 59, 0.1); /* Primary accent border */
    display: flex;
    flex-direction: column;
    z-index: 1;
    backdrop-filter: blur(5px);
}
.match-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--up-shadow-medium), 0 0 25px var(--up-accent-primary);
    border-color: var(--up-accent-secondary);
    z-index: 10;
}

/* Card image (poster) */
.match-card img {
    width: 100%;
    height: clamp(180px, 35vw, 250px); /* Increased height for better poster display */
    object-fit: cover;
    background-color: var(--up-bg-dark); /* Darker background for image fallback */
    display: block;
    border-bottom: 1px solid rgba(255, 59, 59, 0.1);
    transition: transform var(--transition-fast), filter var(--transition-fast);
    flex-shrink: 0;
}
.match-card:hover img {
    transform: scale(1.02);
    filter: brightness(1.05) saturate(1.05);
}

/* Card content area */
.match-card .match-card-content {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    gap: 0.4rem;
    background-color: var(--up-bg-light);
    border-radius: 0 0 var(--border-radius-card) var(--border-radius-card);
    min-height: clamp(90px, 7vw, 110px);
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- Team Logos & Names - Adjusted for text before logo --- */
.match-card .match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background-color: var(--up-bg-medium);
    border-bottom: 1px solid rgba(255, 59, 59, 0.1);
    flex-shrink: 0;
    color: var(--up-text-medium);
    font-size: clamp(0.75rem, 2.2vw, 0.85rem);
}

/* Match Time - Added styling for the 'box' */
.match-card .match-time {
    font-weight: 600;
    background-color: var(--up-bg-dark); /* Background for the time box */
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius-button); /* Rounded corners for the box */
    border: 1px solid rgba(0,0,0,0.1); /* Subtle border */
    color: var(--up-text-dark); /* Text color inside the box */
    box-shadow: var(--up-inset-shadow);
    white-space: nowrap; /* Prevent time from wrapping */
}

.match-card .match-teams {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the whole block */
    gap: 0.2rem; /* Small gap between logo/name and vs */
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--up-text-dark);
    text-shadow: 0 0 4px rgba(0,0,0,0.05);
    flex-wrap: nowrap;
    width: 100%;
    position: relative;
    padding: 0 0.2rem;
    box-sizing: border-box;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.match-card .vs {
    flex-shrink: 0;
    white-space: nowrap;
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4.5vw, 2.5rem); /* Significantly larger VS */
    color: var(--up-accent-danger); /* Danger red for VS */
    font-weight: 800;
    margin: 0 0.5rem; /* Larger margin around VS */
    text-shadow: 0 0 5px rgba(220, 53, 69, 0.6);
    text-align: center;
    line-height: 1;
}

.match-card .team {
    display: flex;
    align-items: center;
    /* Changed flex-direction to row-reverse for text before logo in RTL */
    flex-direction: row-reverse; 
    flex-grow: 1; 
    flex-shrink: 1;
    gap: 0.3rem;
    min-width: 0; /* Allow content to shrink */
    font-size: clamp(0.9rem, 1.2vw, 1rem); /* Font size for team name */
}

.match-card .home-team {
    justify-content: flex-end; /* Align home team to the right of VS */
    text-align: right;
}

.match-card .away-team {
    justify-content: flex-start; /* Align away team to the left of VS */
    text-align: left;
}

.match-card .team span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1; 
    min-width: 0; /* Allow text to truncate */
}

.match-card .team img {
    width: clamp(45px, 6vw, 60px); /* Larger team logos */
    height: clamp(45px, 6vw, 60px); /* Larger team logos */
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    background-color: rgba(255,255,255,0.05);
    box-shadow: inset 0 0 3px rgba(0,0,0,0.1);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    padding: 2px;
    flex-shrink: 0;
    margin: 0; /* Reset margin from default img styles */
}

.match-card .team img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px var(--up-accent-primary), inset 0 0 5px rgba(0,0,0,0.1);
}

.match-card .match-league {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-family: var(--font-body);
    font-size: clamp(0.75rem, 0.85vw, 0.85rem);
    color: var(--up-text-light);
    margin-top: 0.2rem;
}
.match-card .match-league img {
    width: clamp(28px, 2.5vw, 32px);
    height: clamp(28px, 2.5vw, 32px);
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 0;
}

/* Match Status - Centered and 'live' is red */
.match-card .match-status {
    font-family: var(--font-body);
    font-size: clamp(0.75rem, 0.85vw, 0.85rem);
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-button);
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    background-color: rgba(0,0,0,0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
    color: var(--up-text-dark);
    /* Centering the status */
    margin-left: auto;
    margin-right: auto;
    display: block; /* Ensures margin auto works horizontally */
    width: fit-content; /* Ensures it only takes necessary width */
}

.match-card .live-status {
    background-color: var(--up-accent-danger); /* Explicit Red for 'Live' */
    color: var(--up-text-on-accent);
    box-shadow: 0 0 12px rgba(220, 53, 69, 0.6), 0 0 20px rgba(220, 53, 69, 0.4);
    animation: pulse-danger 1.5s infinite alternate;
}
.match-card .upcoming-status {
    background-color: var(--up-accent-warning);
    color: var(--up-text-dark);
    box-shadow: 0 0 12px rgba(255, 193, 7, 0.6), 0 0 20px rgba(255, 193, 7, 0.4);
}
.match-card .finished-status {
    background-color: var(--up-bg-dark);
    color: var(--up-text-medium);
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

/* --- News Card --- */
.news-card {
    background: var(--up-bg-medium);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--up-shadow-soft);
    transition: all var(--transition-medium);
    cursor: pointer;
    text-align: right;
    position: relative;
    border: 1px solid rgba(255, 59, 59, 0.1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
}
.news-card:hover {
    transform: translateY(-3px) scale(1.005);
    box-shadow: var(--up-shadow-medium), 0 0 20px var(--up-accent-primary);
    border-color: var(--up-accent-secondary);
}
.news-card img {
    width: 100%;
    height: clamp(100px, 20vw, 150px);
    object-fit: cover;
    background-color: var(--up-bg-dark);
    display: block;
    border-bottom: 1px solid rgba(255, 59, 59, 0.1);
    transition: transform var(--transition-fast), filter var(--transition-fast);
}
.news-card:hover img {
    transform: scale(1.02);
    filter: brightness(1.05) saturate(1.05);
}
.news-card .news-card-content {
    padding: 0.9rem 1.1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.5rem;
    background-color: var(--up-bg-light);
}
.news-card h3 {
    font-family: var(--font-heading);
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--up-text-dark);
    margin-bottom: 0.3rem;
    text-shadow: 0 0 5px rgba(0,0,0,0.05);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-card p {
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 0.85vw, 0.9rem);
    color: var(--up-text-medium);
    line-height: 1.5;
    margin-bottom: 0.7rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.news-card .news-date {
    font-size: 0.75rem;
    color: var(--up-text-light);
    opacity: 0.9;
    text-align: left;
}

/* --- Pagination Controls (Removed) --- */
.pagination-controls {
    display: none !important; /* Completely hide pagination controls */
}


/* --- Match Details Section --- */
.match-details-section {
    padding: 6vw 3vw;
    background-color: var(--up-bg-light); 
    border-top: 2px solid var(--up-accent-primary);
    box-shadow: 0 0 20px rgba(0,0,0,0.05) inset; /* Lighter inset shadow */
    animation: fadeIn var(--transition-medium) ease-out;
    position: relative;
    z-index: 1;
}

.match-details-section .back-btn {
    margin-bottom: clamp(1.8rem, 2.5vw, 2.2rem);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    padding: 0.7rem 1.6rem;
}

/* Video Player Wrapper (holds the iframe) */
.video-player-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: var(--aspect-ratio-16-9);
    margin: 0 auto 2vw auto;
    background-color: #000;
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--up-shadow-strong);
    border: 2px solid var(--up-accent-primary);
    transition: all var(--transition-medium);
    display: flex;
    justify-content: center;
    align-items: center;
}
.video-player-wrapper:hover {
    transform: scale(1.001);
    box-shadow: var(--up-glow-primary), 0 0 30px rgba(0, 123, 255, 0.3);
}

/* Style for the embedded iframe player */
.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background-color: #000;
}

/* Video overlay for pre-play ad interaction */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    cursor: pointer;
    z-index: 50;
    opacity: 1;
    transition: opacity var(--transition-fast);
}
.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-overlay .overlay-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.video-overlay .video-play-text {
    display: block;
    color: var(--up-text-on-accent);
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-top: 10px;
    text-shadow: 0 0 8px rgba(0,0,0,0.8);
    font-weight: 700;
}

/* Loading Spinner */
#video-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid var(--up-accent-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 51;
    display: none;
}


/* Match Info Box (Description Section) - Removed completely */
.match-info-box {
    display: none !important; 
}


/* Ad Banner Center (under video) */
.ad-banner-center {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Suggested Matches Section */
.suggested-matches-section {
    margin-top: 3vw;
    padding-top: 3vw;
    border-top: 2px solid var(--up-accent-secondary);
}
.suggested-matches-section .section-title {
    color: var(--up-text-dark);
    border-bottom: 2px solid var(--up-accent-primary);
}


/* --- Footer --- */
.main-footer {
    background-color: var(--up-bg-medium);
    color: var(--up-text-medium);
    padding: 3vw 0;
    text-align: center;
    font-family: var(--font-body);
    border-top: 2px solid var(--up-accent-primary);
    box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    z-index: 1;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--up-accent-secondary) 0.25px, transparent 0.25px);
    background-size: 50px 50px;
    background-position: 0 0;
    opacity: 0.08;
    animation: footer-particles-flow 25s linear infinite;
    z-index: 0;
}

.main-footer .footer-content {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1.2rem;
    position: relative;
    z-index: 1;
}

.main-footer p {
    margin-bottom: 1.2vw;
    font-size: clamp(0.8rem, 0.85vw, 0.9rem);
    line-height: 1.6;
    opacity: 0.95;
    text-shadow: 0 0 2px rgba(0,0,0,0.1);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1vw;
}

.footer-links a {
    color: var(--up-accent-primary);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 0.85vw, 0.9rem);
    font-weight: 600;
    padding: 0.6rem 1.4rem;
    border: 1px solid var(--up-accent-primary);
    border-radius: var(--border-radius-button);
    transition: all var(--transition-fast);
    white-space: nowrap;
    box-shadow: var(--up-shadow-soft);
    background: var(--up-bg-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
}
.footer-links a:hover {
    background-color: var(--up-accent-secondary);
    color: var(--up-text-on-accent);
    transform: translateY(-2px) scale(1.005);
    box-shadow: var(--up-glow-secondary), 0 0 15px var(--up-accent-primary);
    border-color: var(--up-accent-primary);
}

/* --- Animations --- */
@keyframes pulse-icon {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.06); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-danger {
    0% { box-shadow: 0 0 8px rgba(220, 53, 69, 0.5), 0 0 15px rgba(220, 53, 69, 0.3); }
    50% { box-shadow: 0 0 12px rgba(220, 53, 69, 0.6), 0 0 25px rgba(220, 53, 69, 0.4); }
    100% { box-shadow: 0 0 8px rgba(220, 53, 69, 0.5), 0 0 15px rgba(220, 53, 69, 0.3); }
}

@keyframes border-glow-anim {
    0% { background-position: 0% 0%; }
    100% { background-position: 400% 0%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes inner-pattern-flow {
    from { background-position: 0 0; }
    to { background-position: 200px 200px; }
}

@keyframes footer-particles-flow {
    from { background-position: 0 0; }
    to { background-position: 400px 400px; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Responsive Design (Media Queries - Mobile First) --- */

/* Smallest devices (up to 479px) - Base styles for mobile */
@media (max-width: 479px) {
    .container {
        padding: 0 0.8rem;
    }

    /* Navbar specific adjustments for original mobile look */
    .main-header .header-content {
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: space-between;
        gap: 0.6rem;
        padding: 0 0.8rem;
    }
    .site-logo {
        order: 0;
        margin-right: auto;
        font-size: clamp(1.6rem, 5vw, 2rem);
    }
    .menu-toggle {
        display: block; /* Show hamburger menu toggle */
    }
    .main-nav {
        display: none; /* Hide nav by default on mobile */
        flex-basis: 100%;
        order: 1;
        flex-direction: column;
        align-items: flex-end; /* Align links to right */
        background: var(--up-bg-medium);
        padding: 1rem 0;
        border-radius: var(--border-radius-card);
        box-shadow: var(--up-shadow-soft);
    }
    .main-nav.active { /* Class added by JS for active mobile menu */
        display: flex;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }
    .main-nav ul li {
        margin: 0;
        width: 100%;
        text-align: right;
    }
    .main-nav ul li a {
        display: block;
        padding: 0.8rem 1.5rem;
        border-radius: 0;
        border: none;
        background: transparent;
        color: var(--up-text-dark);
        font-size: clamp(0.9rem, 4vw, 1.1rem);
        text-align: right;
    }
    .main-nav ul li a::before {
        display: none; /* Hide underline on mobile menu */
    }
    .main-nav ul li a:hover, .main-nav ul li a.active {
        background: var(--up-accent-primary);
        color: var(--up-text-on-accent);
        transform: none;
        box-shadow: none;
        text-shadow: none;
    }
    .search-bar {
        order: 2;
        flex-basis: 100%;
        margin: 0.6rem auto 0.4rem auto;
    }
    .search-bar input {
        width: 100%;
        font-size: clamp(0.8rem, 3.5vw, 0.9rem);
    }

    /* Cards - wider on mobile */
    .match-grid, .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Very wide single column */
        gap: 3vw; /* Increased gap */
        padding: 0 1rem;
    }
    .match-card img {
        height: clamp(180px, 60vw, 300px); /* Make image taller for single column */
    }
    .match-card .match-teams .team img {
        width: clamp(40px, 12vw, 60px); /* Make team logos larger on small screens */
        height: clamp(40px, 12vw, 60px);
    }
    .match-card .vs {
        font-size: clamp(2.2rem, 8vw, 3rem); /* Even larger VS for mobile */
        margin: 0 0.8rem;
    }
    .match-card .team {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }
    .news-card img {
        height: clamp(120px, 40vw, 200px); /* Adjust news card image height */
    }
}

/* Medium devices (480px and up) */
@media (min-width: 480px) {
    html {
        font-size: 14px; 
    }
    .container {
        padding: 0 1rem;
    }
    .main-header .header-content {
        flex-wrap: nowrap; /* No wrap on larger screens */
        padding: 0 1rem;
        gap: 1.2rem;
    }
    .site-logo {
        font-size: clamp(2rem, 3.2vw, 2.4rem);
        margin-right: 0; /* Reset margin */
        order: 0;
    }
    .menu-toggle {
        display: none; /* Hide hamburger menu */
    }
    .main-nav {
        display: flex; /* Always flex on larger screens */
        flex-basis: auto;
        order: 1;
        flex-direction: row; /* Row direction for desktop nav */
        overflow-x: hidden; /* No horizontal scroll */
        background: transparent; /* Transparent background */
        padding: 0;
        box-shadow: none;
    }
    .main-nav ul {
        flex-direction: row;
        width: auto;
        padding: 0;
        gap: 0;
    }
    .main-nav ul li {
        margin: 0 1rem;
        width: auto;
        text-align: right;
    }
    .main-nav ul li a {
        display: inline-flex;
        padding: 0.7rem 1.4rem;
        border-radius: var(--border-radius-button);
        border: 1px solid rgba(255, 59, 59, 0.1);
        background: var(--up-bg-medium);
        color: var(--up-text-medium);
        font-size: clamp(0.85rem, 0.85vw, 0.95rem);
    }
    .main-nav ul li a::before {
        display: block; /* Show underline */
    }
    .main-nav ul li a:hover, .main-nav ul li a.active {
        background: var(--up-accent-primary);
        color: var(--up-text-on-accent);
        transform: translateY(-1px) scale(1.003);
        box-shadow: var(--up-glow-primary);
    }
    .search-bar {
        order: 2;
        flex-basis: auto;
        margin: 0;
        max-width: none;
    }

    /* Card grids start forming more columns */
    .match-grid, .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Example: can be 3 columns on larger mobiles */
        gap: 1.5vw;
        padding: 0 1vw;
    }

    /* Video player on larger mobile/tablet */
    .video-player-wrapper {
        margin-bottom: 2vw;
        max-width: 800px;
    }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
    html {
        font-size: 15px; /* Final desktop base font */
    }
    .container {
        padding: 0 1.5rem; /* Larger padding for desktops */
    }
    .main-header .header-content {
        padding: 0 1.5rem;
    }

    /* Cards - 2 columns on desktop, wider */
    .match-grid, .news-grid {
        grid-template-columns: repeat(2, 1fr); /* Exactly 2 columns */
        gap: 2vw; /* Increased gap */
        padding: 0 2vw;
    }
    .match-card img {
        height: clamp(200px, 20vw, 300px); /* Larger height for desktop posters */
    }
    .match-card .match-teams .team img {
        width: clamp(50px, 5vw, 70px); /* Larger team logos on desktop */
        height: clamp(50px, 5vw, 70px);
    }
    .match-card .vs {
        font-size: clamp(2.5rem, 3.5vw, 3.5rem); /* Even larger VS */
        margin: 0 1rem;
    }
    .match-card .team span {
        font-size: clamp(1rem, 1.5vw, 1.2rem);
    }

    /* Removed hero section media queries as the section is removed */
    /* #hero-section {
        padding: 8vw 0;
    }
    #hero-section h1 {
        font-size: clamp(3rem, 5vw, 5rem);
    }
    #hero-section p {
        font-size: clamp(1.2rem, 2vw, 1.8rem);
    } */

    /* Other sections */
    .view-section {
        padding: 4vw 0;
    }
    .section-title {
        font-size: clamp(2.5rem, 3.5vw, 3.5rem);
        margin-bottom: 3vw;
    }
}

/* Removed image frame for the "ultimate pitch" image in hero section */
/* #hero-section img.ultimate-pitch-frame {
    border: 5px solid var(--up-accent-secondary); 
    border-radius: var(--border-radius-card);
    box-shadow: var(--up-shadow-medium), var(--up-glow-primary);
    transition: all var(--transition-medium);
    margin-bottom: 2rem;
    max-width: 80%;
    height: auto;
    object-fit: cover;
    animation: frame-glow 3s infinite alternate ease-in-out;
} */

/* @keyframes frame-glow {
    0% {
        box-shadow: var(--up-shadow-medium), 0 0 10px rgba(255, 59, 59, 0.4);
    }
    50% {
        box-shadow: var(--up-shadow-strong), 0 0 25px rgba(255, 59, 59, 0.8);
    }
    100% {
        box-shadow: var(--up-shadow-medium), 0 0 10px rgba(255, 59, 59, 0.4);
    }
} */
/* In your CSS file (e.g., style.css) */

#match-player-container {
    position: relative; /* Important for absolute positioning of children, if needed, and for proper containing */
    width: 100%;
    /* Define a height for the container. Use a fixed pixel height, a viewport height (vh),
       or an aspect ratio trick (padding-bottom). Choose one that fits your design. */
    height: 500px; /* Example: Fixed height */
    /* OR */
    /* height: 56.25vw; /* Example: 16:9 aspect ratio (9 / 16 = 0.5625) relative to viewport width */
    /* OR */
    /* padding-bottom: 56.25%; /* Example: For responsive aspect ratio, requires no explicit height,
                                    and children must be absolutely positioned */
    background-color: black; /* To see the container */
    overflow: hidden; /* Important to clip content if player goes outside */
}

#match-player-container video,
#match-player-container iframe {
    position: absolute; /* If using padding-bottom aspect ratio trick on parent */
    top: 0;
    left: 0;
    width: 100%;  /* This is already set by JS, but good to have in CSS too */
    height: 100%; /* This is already set by JS, but good to have in CSS too */
    display: block; /* Ensures no extra spacing issues */
}
