:root {
    --primary-color: #ffd700;
    --primary-dark: #b8860b;
    --secondary-color: #1a1a1a;
    --bg-dark: #0f0f0f;
    --text-light: #ffffff;
    --text-gray: #a0a0a0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --neon-glow: 0 0 10px rgba(255, 215, 0, 0.3);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 215, 0, 0.05) 0%, transparent 20%);
}

/* Background Animation */
#background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Header Styles */
.app-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    margin-bottom: 1.5rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-container i {
    font-size: 2.2rem;
    color: var(--primary-color);
    text-shadow: var(--neon-glow);
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.app-logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.app-logo span {
    font-weight: 300;
}

.search-bar {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.7rem 1.2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 350px;
    transition: var(--transition-speed);
}

.search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    width: 100%;
    font-size: 0.95rem;
}

.search-bar i {
    color: var(--text-gray);
}

/* Navigation */
.category-nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 5% 0.5rem 5%;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-gray);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.cat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.cat-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #000;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* Main Content */
.content-area {
    padding: 2rem 5%;
    min-height: 80vh;
}

.content-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.section-badge {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: var(--text-gray);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* GRIDS */
.matches-grid,
.tv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.tv-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    /* Smaller cards for TV */
}

/* HORIZONTAL SCROLL */
.horizontal-scroll-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 20px;
}

.horizontal-grid {
    display: flex;
    gap: 20px;
}

/* TODAY / UPCOMING CARD STYLES */
.event-card {
    min-width: 320px;
    max-width: 320px;
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 215, 0, 0.3);
}

.event-poster-area {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.event-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-poster {
    transform: scale(1.1);
}

.event-details {
    padding: 1rem;
    background: linear-gradient(to bottom, rgba(30, 30, 30, 0.8), rgba(15, 15, 15, 0.95));
}

.event-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 8px;
}

.clickable-event {
    cursor: pointer;
}

.clickable-event .event-poster-area::after {
    content: '\f04b';
    /* Play Icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    background: rgba(255, 215, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #000;
    transition: all 0.3s ease;
    opacity: 0;
}

.clickable-event:hover .event-poster-area::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* --- TV CARD STYLES --- */
.tv-card {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 215, 0, 0.3);
}

.tv-logo-area {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    height: 140px;
    position: relative;
}

.tv-logo {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.tv-card:hover .tv-logo {
    transform: scale(1.1);
}

.tv-info {
    padding: 1rem;
    background: linear-gradient(to bottom, rgba(30, 30, 30, 0.8), rgba(15, 15, 15, 0.95));
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tv-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 5px;
}

.tv-source {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
}

/* --- MATCH CARD STYLES --- */
.match-card {
    background: rgba(26, 26, 26, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.match-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 215, 0, 0.3);
}

.card-header-area {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    opacity: 0.6;
}

.match-card:hover .background-image {
    transform: scale(1.1);
    opacity: 0.4;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 50px;
    height: 50px;
    background: rgba(255, 215, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.play-overlay i {
    color: #000;
    font-size: 1.2rem;
    margin-left: 3px;
}

.match-card:hover .play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-live {
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.3);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.2);
    animation: pulse 2s infinite;
}

.status-upcoming {
    color: #00fa9a;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(255, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.vs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 20px;
    background: linear-gradient(to bottom, transparent, #000);
    z-index: 1;
}

.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 35%;
    text-align: center;
}

.team-logo-placeholder {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.team-logo-placeholder i {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.team-name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.vs-badge {
    font-size: 1rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.2);
    font-style: italic;
}

.card-details {
    padding: 1.2rem;
    background: linear-gradient(to bottom, rgba(30, 30, 30, 0.8), rgba(15, 15, 15, 0.95));
}

.match-main-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.modal-match-name {
    text-align: center;
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.stream-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stream-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    color: white;
}

.stream-btn i {
    font-size: 1.5rem;
}

.stream-btn div {
    display: flex;
    flex-direction: column;
}

.stream-btn span {
    font-weight: 700;
    font-size: 1rem;
}

.stream-btn small {
    color: var(--text-gray);
    font-size: 0.8rem;
}

.stream-btn:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.08);
}

.stream-btn.ad-free {
    border-color: rgba(255, 215, 0, 0.3);
}

.stream-btn.ad-free:hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.stream-btn.ad-free i {
    color: var(--primary-color);
}

.stream-btn.with-ads i {
    color: #00fa9a;
}

.stream-btn.web-stream i {
    color: #4facfe;
}


/* Footer */
.app-footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 5%;
    background: #0a0a0a;
    text-align: center;
    margin-top: auto;
}

.app-footer p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Visitor Counter */
.visitor-counter {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 15px 0;
}

.counter-digit {
    background: #222;
    padding: 5px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    border: 1px solid #333;
    color: var(--primary-color);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .search-bar {
        width: 100%;
    }

    .matches-grid,
    .tv-grid {
        grid-template-columns: 1fr;
    }

    .tv-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .loading-spinner {
        height: 200px;
    }
}