:root {
    --primary-bg-color: #121212;
    --secondary-bg-color: #1e1e1e;
    --card-bg-color: #2a2a2a;
    --text-color: #e0e0e0;
    --primary-accent-color: #bb86fc;
    --secondary-accent-color: #03dac6;
    --border-color: #444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--primary-bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background-color: var(--secondary-bg-color);
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 2rem;
    font-weight: 500;
    color: var(--primary-accent-color);
}

main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background-color: var(--secondary-bg-color);
    padding: 1rem;
    border-radius: 8px;
}

.select-container, .filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    flex-grow: 1;
}

.styled-select,
input[type="text"] {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem;
    font-size: 1rem;
    flex-grow: 1;
    min-width: 200px;
}

.styled-select {
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23e0e0e0%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 0.7em top 50%;
    background-size: 1.2em auto;
}


input[type="text"]::placeholder {
    color: #888;
}

#matches-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.match-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.match-card .round {
    font-size: 0.9rem;
    color: var(--secondary-accent-color);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.match-card .date {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 1rem;
}

.match-card .teams {
    display: flex;
    justify-content: center; /* Keep the overall grouping centered */
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem; /* Adjusted gap */
}

.match-card .team {
    flex: 1; /* Allow teams to grow and shrink equally */
    min-width: 0; /* Allow content to shrink below intrinsic size */
    font-size: 1.8rem; /* Larger team name font size */
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-card .team-one {
    text-align: right;
}

.match-card .team-two {
    text-align: left;
}

.match-card .score {
    padding: 0 0.5rem;
    text-align: center;
}

.match-card .score-ft {
    font-size: 2.2rem;
    color: var(--primary-accent-color);
    font-weight: bold;
    line-height: 1.2;
}

.match-card .score-ht {
    font-size: 1rem;
    color: #aaa;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }

    .controls {
        flex-direction: column;
    }

    .select-container, .filter-container {
        flex-direction: column;
        width: 100%;
    }

    .styled-select,
    input[type="text"] {
        width: 100%;
    }

    .match-card {
        padding: 1rem;
    }

    .match-card .teams {
        gap: 0.5rem; /* Reduce gap on smaller screens */
        align-items: center; /* Re-center vertically */
    }

    .match-card .team {
        font-size: 1.2rem; /* Reduce font size for team names */
        white-space: normal; /* Allow team names to wrap */
        overflow: visible;
        text-overflow: clip;
    }

    .match-card .score-ft {
        font-size: 1.8rem; /* Reduce font size for score */
    }

    .match-card .score-ht {
        font-size: 0.9rem;
    }
}
