/* Farbthema von FC Barcelona */
:root {
    --barca-blue: #181733;
    --barca--footer-blue: #004D98;
    --barca-granate: #A50044;
    --barca-yellow: #FFCB00;
    --barca-white: #FFFFFF;
    --gradient: linear-gradient(135deg, #004D98, #A50044);
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--barca-blue); /* Hintergrundfarbe Blau */
    color: var(--barca-white); /* Standardfarbe für Text */
    overflow-x: hidden;
}

/* Header */
header {
    background-color: var(--barca-blue);
    color: var(--barca-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--barca-yellow); 
    position: relative;
    z-index: 1;
}

.logo-container img {
    height: 120px; /* Größeres Logo */
    cursor: pointer;
    transition: transform 0.3s ease;
}

nav {
    margin-right: 50px;
}

nav ul {
    list-style-type: none;
    display: flex;
    gap: 30px;
    padding: 0;
    margin: 0;
}

nav ul li a {
    color: var(--barca-white);
    text-decoration: none;
    font-family: "Fugaz One", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-weight: bold;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--barca-yellow);
}

/* Titel */
h1, h2, h3, h4, h5, h6 {
    color: var(--barca-yellow);
    font-family: "Fugaz One", sans-serif;
    font-weight: 400;
    font-style: normal;
    text-align: center; /* H-Titel zentrieren */
}

h2 {
    font-size: 2.0rem;
    margin-top: 15px;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.5rem;
    margin-top: 20px;
    margin-bottom: 20px;
}
/* Main Content */
main {
    padding: 0 60px; /* Padding links und rechts hinzufügen */
}

/* General table styling */
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 1.2em;
    border: 2px solid var(--barca-yellow); /* Yellow borders for the whole table */
    margin-bottom: 40px; /* Add space below table */
}

/* Header row styling */
thead tr {
    background-color: var(--barca-blue); /* Barca Blue for the header */
    color: var(--barca-yellow); /* Yellow text to contrast with blue */
    font-weight: bold;
    font-size: 1em;
    border-bottom: 3px solid var(--barca-yellow); /* Thicker yellow border for headers */
}

/* Borders for cells */
td, th {
    border: 1px solid var(--barca-yellow); /* Yellow borders for cells */
    padding: 12px 20px; /* Padding for better readability */
}

/* Odd rows styling */
tbody tr:nth-of-type(odd) {
    background-color: var(--barca-granate); /* Granate for odd rows */
    color: var(--barca-white); /* White text for contrast */
}

/* Even rows styling */
tbody tr:nth-of-type(even) {
    background-color: var(--barca-blue); /* Blue for even rows */
    color: var(--barca-white); /* White text for contrast */
}

/* Hover effect for all rows */
tbody tr:hover {
    background-color: var(--barca-yellow); /* Highlight row with yellow */
    color: var(--barca-blue); /* Darker text when highlighted */
}

/* Spezifische Anpassungen für die Spielerliste */
#players {
    width: 50%; /* Spielerliste ist nur halb so breit wie die Spielplan-Tabelle */
    table-layout: auto;
    margin: 0 auto; /* Tabelle wird in der Mitte des Containers ausgerichtet */
    margin-bottom: 40px; /* Fügt ein Margin unterhalb der Tabelle hinzu für den Abstand zum Footer */
}

#players th, #players td {
    padding: 8px 10px; /* Weniger Padding für die Spielerliste */
}

/* Add more space between tables */
.table-spacing {
    margin-top: 50px; /* Add space before the second table */
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo-container img {
        height: 70px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    nav ul li {
        margin: 0;
    }

    canvas {
        height: 300px;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 1rem;
    }

    table {
        font-size: 1em;
    }

    #players {
        width: 100%; /* Die Spielerliste-Tabelle nimmt auf kleinen Bildschirmen die volle Breite ein */
    }
}

/* Canvas für Diagramme */
canvas {
    background-color: white;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.chart-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%; /* Ensure it spans the full width */
    max-width: 800px; /* Set a maximum width that matches the width of your header logo and nav */
    margin: 0 auto; /* Center the container */
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    height: auto;
}

/* Adjust canvas within the container */
.chart-container canvas {
    width: 45%;  /* Limit canvas width to 45% to make it responsive */
    height: auto;
    max-width: 350px; /* Max width for each chart */
    max-height: 350px;
    margin: 0 20px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .chart-container {
        flex-direction: column; /* Stapelt die Diagramme untereinander bei kleineren Bildschirmen */
    }

    .chart-container canvas {
        width: 80%; /* Breite auf 80% setzen bei kleineren Bildschirmen */
        margin-bottom: 20px; /* Fügt Abstand zwischen den gestapelten Diagrammen hinzu */
        max-width: 300px; /* Reduzierte maximale Breite bei kleineren Bildschirmen */
        max-height: 300px; /* Reduzierte maximale Höhe bei kleineren Bildschirmen */
    }
}

/* Filter Optionen */
.filter-select {
    -webkit-appearance: none;  /* Für Safari/Chrome */
    -moz-appearance: none;     /* Für Firefox */
    appearance: none;          /* Für moderne Browser */
    background-color: var(--barca-granate); /* Behalte das Styling bei */
    padding: 15px;
    font-size: 1.2em;
    color: var(--barca-white);
    border: none;
    border-radius: 8px;
    width: 250px;
    box-shadow: 0 4px 10px rgba(3, 3, 3, 0.15);
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align-last: center;  /* Zentriert den Text */
    display: block;
    margin: 20px auto;
}

/* Hover-Effekt für Dropdown */
.filter-select:hover {
    background-color: var(--barca-yellow); /* Gelb beim Hover */
    color: var(--barca-blue); /* Dunkler Text beim Hover */
    transform: scale(1.05);   /* Leichtes Vergrößern beim Hover */
    cursor: pointer;
}

/* Dropdown-Optionen Styling */
.filter-select option {
    background-color: var(--barca-granate); /* Granate als Option-Hintergrund */
    color: var(--barca-white);              /* Weiße Schrift für Optionen */
}

/* Abstand zwischen dem Filter und den anderen Elementen */
.filter-select {
    margin-top: 20px;  /* Abstand über dem Dropdown */
    margin-bottom: 30px; /* Abstand unter dem Dropdown */
}
