/**
 * =========================================
 *  SPORTFLIX — MAIN STYLES
 *  Dark, Premium, Cinematic, Responsive
 * =========================================
 */

/* ----- RESET & BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0c10;
    color: #f0f4fa;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img {
    display: block;
    max-width: 100%;
}

/* ----- SCROLLBAR ----- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #1e2229;
}
::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 8px;
}

/* ----- CONTAINER ----- */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ----- HEADER ----- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 0;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #f0f4fa 0%, #e50914 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo img {
    -webkit-text-fill-color: initial;
    height: 32px;
}

.nav {
    display: flex;
    gap: 28px;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav a {
    color: #b0b8c5;
    transition: 0.2s;
}

.nav a:hover {
    color: #fff;
}

.nav a.active {
    color: #fff;
    border-bottom: 2px solid #e50914;
    padding-bottom: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-signup {
    background: #e50914;
    color: #fff;
    padding: 10px 22px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.3);
}

.btn-signup:hover {
    background: #c40812;
    transform: scale(1.02);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: #fff;
}

/* ----- HERO ----- */
.hero {
    padding: 60px 0 70px;
    background: radial-gradient(circle at 20% 30%, #1a1f2a, #0a0c10 70%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.hero::after {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1 1 400px;
}

.hero-text h1 {
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 30%, #e50914 80%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2rem;
    color: #b0b8c5;
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary {
    background: #e50914;
    color: #fff;
    padding: 14px 34px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.4);
    transition: 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    transform: scale(1.03);
    background: #c40812;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 14px 34px;
    border-radius: 40px;
    font-weight: 600;
    transition: 0.2s;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hero-visual {
    flex: 1 1 300px;
    text-align: center;
}

.hero-visual i {
    font-size: 10rem;
    color: rgba(229, 9, 20, 0.2);
}

/* ----- SECTION TITLES ----- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-sub {
    color: #8f98a8;
    margin-bottom: 28px;
}

/* ----- SPORT FILTER ----- */
.filter-wrap {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0 24px;
    scrollbar-width: thin;
    flex-wrap: nowrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 22px;
    border-radius: 40px;
    color: #b0b8c5;
    font-weight: 500;
    white-space: nowrap;
    transition: 0.2s;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: rgba(229, 9, 20, 0.2);
    border-color: #e50914;
    color: #fff;
}

/* ----- MATCH GRID ----- */
.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin: 16px 0 40px;
}

.match-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 20px 18px;
    transition: 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
}

.match-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 9, 20, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.match-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 40px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.badge-live {
    background: #e50914;
    color: #fff;
    animation: pulse 1.5s infinite;
}

.badge-upcoming {
    background: #f5a623;
    color: #0a0c10;
}

.badge-finished {
    background: #3a3f4a;
    color: #b0b8c5;
}

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

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.match-teams .vs {
    color: #6b7484;
    font-weight: 400;
    font-size: 0.9rem;
}

.match-score {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    padding: 4px 0;
}

.match-meta {
    font-size: 0.8rem;
    color: #8f98a8;
    margin: 8px 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.match-meta i {
    margin-right: 4px;
    width: 16px;
}

.btn-watch {
    background: #e50914;
    color: #fff;
    padding: 12px 0;
    border-radius: 40px;
    font-weight: 700;
    transition: 0.2s;
    width: 100%;
    margin-top: 6px;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

.btn-watch:hover {
    background: #c40812;
}

.btn-watch:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ----- LOADING OVERLAY ----- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

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

.overlay .spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #e50914;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px 0;
}

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

.overlay h2 {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.overlay p {
    color: #b0b8c5;
    margin-top: 8px;
}

/* ----- EMPTY / ERROR ----- */
.empty-state {
    text-align: center;
    padding: 50px 10px;
    color: #8f98a8;
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 16px;
}

.retry-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #e50914;
    color: #fff;
    padding: 10px 30px;
    border-radius: 40px;
    margin-top: 18px;
    font-weight: 600;
}

.retry-btn:hover {
    background: rgba(229, 9, 20, 0.2);
}

/* ----- SKELETON ----- */
.skeleton {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    height: 220px;
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.3; }
    50% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

/* ----- TOAST ----- */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e2229;
    padding: 14px 28px;
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    z-index: 999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    font-weight: 500;
    font-size: 0.95rem;
}

/* ----- FOOTER ----- */
.footer {
    background: #0f1218;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding: 48px 0 24px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 30px;
}

.footer a {
    color: #8f98a8;
    transition: 0.2s;
    font-size: 0.9rem;
    display: block;
    margin: 6px 0;
}

.footer a:hover {
    color: #fff;
}

.footer .brand {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff, #e50914);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer .brand img {
    -webkit-text-fill-color: initial;
    height: 28px;
}

.footer .copy {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 20px;
    text-align: center;
    color: #5f6878;
    font-size: 0.85rem;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 1024px) {
    .match-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 12px;
        padding: 20px 0;
    }
    .nav.open {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .header .container {
        flex-wrap: wrap;
    }
    .hero-text h1 {
        font-size: 2.6rem;
    }
}

@media (max-width: 640px) {
    .match-grid {
        grid-template-columns: 1fr;
    }
    .hero-text h1 {
        font-size: 2.2rem;
    }
    .hero {
        padding: 40px 0 50px;
    }
    .container {
        padding: 0 16px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    .hero-actions a {
        text-align: center;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}