:root {
    --bg-dark: #0a0a12;
    --white: #ffffff;
    --neon-blue: #00d2ff;
    --neon-green: #39ff14;
    --fifa-black: #000000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: white;
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0a0a12 100%);
    z-index: -1;
}

.background-overlay::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 180deg at 50% 50%, var(--neon-blue) 0deg, transparent 60deg, var(--neon-green) 180deg, transparent 240deg, var(--neon-blue) 360deg);
    animation: rotateBg 20s linear infinite;
    opacity: 0.1;
    filter: blur(80px);
}

@keyframes rotateBg {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    width: 100%;
}

.logo-area {
    display: flex;
    flex-direction: column;
    line-height: 0.9;
}

.fifa-text {
    font-size: 4rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -2px;
    background: var(--white);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.match-draw-text {
    font-size: 1.2rem;
    letter-spacing: 12px;
    color: var(--neon-green);
    font-weight: 700;
    text-shadow: 0 0 10px var(--neon-green);
    margin-top: 0.5rem;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
}

.filters-card {
    width: 450px;
    margin-bottom: 3rem;
}

h2 {
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--neon-blue);
    padding-left: 10px;
    color: #ccc;
}

/* ... (rest of the file remains, appending only at the end) ... */
.team-name {
    font-size: 0.9rem;
}


/* League Checkboxes Grid */
.leagues-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.league-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: 0.3s;
}

.league-checkbox:hover {
    background: rgba(0, 210, 255, 0.05);
    border-color: rgba(0, 210, 255, 0.3);
}

.league-checkbox input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #555;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: 0.3s;
    padding: 2px 9px;
}

.league-checkbox input:checked+.checkbox-custom {
    background: var(--neon-blue);
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
}

.league-checkbox input:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-weight: 900;
    font-size: 14px;
}

.league-checkbox:has(input:checked) {
    border-color: var(--neon-blue);
    background: rgba(0, 210, 255, 0.1);
}

.league-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #ddd;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--neon-blue);
    color: white;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.neon-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #222;
    border-radius: 5px;
    outline: none;
}

.neon-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--neon-blue);
    border: 2px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px var(--neon-blue);
    transition: 0.3s;
}

.neon-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px var(--neon-blue);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.slider-labels span {
    color: var(--neon-blue);
    font-weight: 700;
}

.btn-primary {
    width: 100%;
    padding: 1.2rem;
    background: var(--neon-green);
    border: none;
    border-radius: 10px;
    color: black;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary span {
    position: relative;
    z-index: 2;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(57, 255, 20, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover .btn-glow {
    width: 300px;
    height: 300px;
    opacity: 0;
}

.results-area {
    width: 100%;
    max-width: 450px;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    margin-bottom: 20px;
}

.match-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.team-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40%;
    text-align: center;
}

.team-shield {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
}

.team-name {
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.team-level {
    font-size: 1rem;
    color: var(--neon-blue);
    font-weight: 900;
}

.vs-badge {
    font-weight: 900;
    font-style: italic;
    color: var(--neon-green);
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.hidden {
    display: none;
}

.loader-content {
    text-align: center;
}

.fifa-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(0, 210, 255, 0.1);
    border-left-color: var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px var(--neon-blue);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-content p {
    letter-spacing: 5px;
    font-weight: 900;
    color: white;
}

.error-msg {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    color: #ff4d4d;
}

@media (max-width: 600px) {
    .container {
        padding: 1.5rem 0.8rem;
    }

    header {
        margin-bottom: 2rem;
    }

    .logo-area {
        transform: scale(0.85);
    }

    .fifa-text {
        font-size: 3.2rem;
    }

    .match-draw-text {
        font-size: 0.85rem;
        letter-spacing: 4px;
    }

    .glass {
        padding: 1.5rem 1.2rem;
        /* More breathing room inside the card */
    }

    .filters-card {
        margin-bottom: 2rem;
    }

    h2 {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .leagues-grid {
        grid-template-columns: 1fr;
        /* Single column for better tap targets and space */
        gap: 0.6rem;
    }

    .league-checkbox {
        padding: 0.7rem 1rem;
    }

    .match-card {
        padding: 1.8rem 1rem;
        flex-direction: column;
        gap: 1.5rem;
    }

    .team-info {
        width: 100%;
    }

    .team-shield {
        width: 80px;
        height: 80px;
    }

    .vs-badge {
        font-size: 2rem;
        margin: 0.5rem 0;
    }

    .team-name {
        font-size: 1rem;
    }

    #search-teams {
        padding: 14px;
        /* Larger tap target */
    }
}

/* Custom Selection Styles */
.search-container {
    position: relative;
    width: 100%;
}

#search-teams {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--neon-blue);
    border-radius: 8px;
    color: white;
    outline: none;
    transition: 0.3s;
}

#search-teams:focus {
    box-shadow: 0 0 10px var(--neon-blue);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    background: #151525;
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--neon-blue);
    border-radius: 3px;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-item:hover {
    background: rgba(0, 210, 255, 0.1);
}

.search-item img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    margin-right: 12px;
}

.search-item span {
    font-size: 0.85rem;
    font-weight: 600;
}

.selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.team-chip {
    display: flex;
    align-items: center;
    background: rgba(0, 210, 255, 0.15);
    border: 1px solid var(--neon-blue);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    cursor: default;
    animation: fadeIn 0.3s ease-out;
}

.team-chip .remove-team {
    margin-left: 8px;
    cursor: pointer;
    color: var(--neon-blue);
    font-size: 14px;
    font-weight: 900;
}

.team-chip .remove-team:hover {
    color: #ff4d4d;
}

.toggle-custom {
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.2);
    margin-top: 10px;
}

.toggle-custom:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--neon-blue);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}