/*
 * Administrations‑Stylesheet
 *
 * Dieses Stylesheet modernisiert die Darstellung der Administrations‑
 * und Login‑Seiten.  Es nutzt Flexbox‑Layouts, Karten mit sanften
 * Schlagschatten und eine Navigationsleiste, um die Inhalte klar zu
 * strukturieren.  Alle Farben leiten sich von der Akzentfarbe ab,
 * sodass Änderungen zentral erfolgen können.  Das Scoreboard und
 * dessen Editor sind von diesen Regeln ausgenommen und nutzen
 * weiterhin ihre eigenen Styles.
 */

:root {
    --accent-color: #c40205;
    --accent-hover: #a90204;
    /* Dark red gradient background similar to scoreboard */
    --background: radial-gradient(circle at center, rgba(196, 2, 5, 0.8), #330000);
    /* Semi‑transparent card background for modern look.  Use a
       slightly darker tone so weißer Text klarer lesbar bleibt. */
    --card-bg: rgba(0, 0, 0, 0.5);
    --card-shadow: rgba(0, 0, 0, 0.5);
    /* Text colour becomes light to contrast dark background */
    --text-color: #ffffff;
}

body.admin {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    /* Apply gradient background */
    background: var(--background);
    color: var(--text-color);
}

/* Navigation bar at the top of each admin page */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Use a semi-transparent dark bar so it floats over gradient */
    /* Increase transparency to let the gradient show through */
    background-color: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.navbar .nav-title {
    font-size: 1.25rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.navbar .nav-links a {
    color: #ffffff;
    margin-left: 1rem;
    text-decoration: none;
    font-weight: 500;
    /* Make links block-level with padding so hover styles do not shift layout */
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
/* Override hover state: change only the background and text colour, without
   modifying padding or causing layout shifts. */
.navbar .nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
}

/* Container that wraps the main content on admin pages */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Generic card for grouping related content */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--card-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Heading styles inside cards */
.card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    color: var(--accent-color);
}

/* Form styles */
.form-card label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}
.form-card input[type="text"],
.form-card input[type="password"],
.form-card input[type="number"],
.form-card input[type="file"],
.form-card select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
    /* Darken input backgrounds slightly for better contrast */
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}
.form-card button {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    font-size: 1rem;
    width: 100%;
}
.form-card button:hover {
    background-color: var(--accent-hover);
}

/* Match list styles */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.match-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--card-shadow);
    padding: 1rem;
}
.match-card .match-info {
    flex-grow: 1;
}
.match-card .match-info h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--accent-color);
}
.match-card .match-info p {
    margin: 0.2rem 0;
    font-size: 0.9rem;
}
.match-card .match-actions {
    display: flex;
    gap: 0.5rem;
}

/* Button style used inside match cards and forms */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease-in-out;
}
.btn:hover {
    background-color: var(--accent-hover);
}

/* Messages for success or error feedback */
.message {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.message.success {
    color: #28a745;
}
.message.error {
    color: #dc3545;
}

/* Centered card for login and settings pages */
.centered-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 4rem);
}
.centered-card {
    max-width: 400px;
    width: 100%;
}

/*
 * Verbesserte Formular-Darstellung
 *
 * Um die Eingabefelder, Dropdowns und Buttons auf den Hauptseiten klarer
 * lesbar zu machen, werden helle Hintergründe und dunkle Texte
 * verwendet.  Zusätzlich wird die Schriftgröße leicht erhöht und der
 * Innenabstand vergrößert.  Diese Regeln gelten ausschließlich für
 * Seiten, die das admin.css einbinden (z. B. Startseite, Login und
 * Einstellungen) und wirken sich nicht auf die Scoreboard- oder
 * Verwaltungsseiten aus, da diese Dateien admin.css nicht laden.
 */
.form-card input[type="text"],
.form-card input[type="password"],
.form-card input[type="number"],
.form-card input[type="file"],
.form-card select {
    background-color: rgba(255, 255, 255, 0.9);
    color: #000;
    border: 1px solid #ccc;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1.1rem;
}

/* Platzhaltertexte deutlich sichtbar auf hellem Hintergrund */
.form-card input::placeholder {
    color: #666;
}

/* Dropdown-Optionen: dunkler Text auf hellem Hintergrund */
.form-card select option {
    color: #000;
    background-color: #fff;
}

/* Bessere Hover‑Erkennung bei Buttons: leichtes Aufhellen */
.btn:hover,
.form-card button:hover {
    filter: brightness(1.1);
    color: #fff;
}

/* Navigationslinks lesbarer machen: dezent hinterlegen und abgerundet wird in der globalen :hover-Regel weiter oben definiert. */

/* Match‑Karten heben sich beim Überfahren hervor */
.match-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
}