
/* BC Lange Bande Hamm – Hausturnier */

:root {
    color-scheme: dark;
    --bg: #111214;
    --surface: #222427;
    --surface-hover: #2e3135;
    --text: #f5f5f5;
    --muted: #b4b7bc;
    --border: #414449;
    --accent: #a94444;
    --accent-hover: #c05252;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px 20px;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

body > h1,
body > h2,
body > p,
body > form,
body > table,
body > ul {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

h1, h2, h3 {
    color: #fff;
    line-height: 1.3;
}

h1 {
    margin-top: 15px;
    margin-bottom: 25px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

a {
    color: #f0f0f0;
    text-underline-offset: 4px;
}

a:hover {
    color: #ffb4b4;
}

button,
input[type="submit"],
.button {
    display: inline-block;
    padding: 11px 18px;
    background: var(--accent);
    color: #fff;
    border: 1px solid transparent;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
input[type="submit"]:hover,
.button:hover {
    background: var(--accent-hover);
    color: #fff;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

input,
select,
textarea {
    max-width: 100%;
    padding: 10px 12px;
    background: #181a1d;
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    font: inherit;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

form p {
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 10px;
}

th,
td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    background: #303338;
    color: #fff;
}

tr:hover td {
    background: var(--surface-hover);
}

ul {
    padding-left: 25px;
}

.site-header {
    max-width: 1100px;
    margin: 0 auto 35px;
    padding: 20px 0;
    display: flex;
    align-items: center;
    gap: 22px;
    border-bottom: 1px solid var(--border);
}

.site-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.site-title {
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
}

.site-subtitle {
    margin: 5px 0 0;
    color: var(--muted);
}

@media (max-width: 700px) {
    body {
        padding: 15px;
    }

    .site-header {
        gap: 14px;
    }

    .site-logo {
        width: 70px;
        height: 70px;
    }

    th,
    td {
        padding: 9px;
        font-size: 0.9rem;
    }
}

.site-brand {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.site-brand:hover {
    opacity: 0.9;
}

.admin-action {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 5px 12px;
    margin-bottom: 8px;
    background: #303338;
    color: #ffffff;
    border: 1px solid #50545a;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
}

.admin-action:hover {
    background: #a94444;
    border-color: #a94444;
    color: #ffffff;
}

button.admin-action {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    background: #a94444;
    border-color: #a94444;
    color: #ffffff;
}

button.admin-action:hover {
    background: #c05252;
    border-color: #c05252;
}

/* Turnierübersicht */
.tournament-table {
    width: 1000px;
    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.tournament-table th {
    background: #303338;
    color: #ffffff;
    padding: 14px 12px;
    text-align: left;
    border-bottom: 2px solid #a94444;
}

.tournament-table td {
    padding: 12px;
    border-bottom: 1px solid #44484d;
    vertical-align: middle;
}

.tournament-table tbody tr:hover {
    background: #292c30;
}

/* Tabellen auf Smartphones scrollbar machen */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Öffentliche Turnierkarten */
.tournament-card {
    background: #222427;
    border: 1px solid #44484d;
    border-left: 4px solid #a94444;
    border-radius: 8px;
    padding: 20px 25px;
    margin: 20px auto;
    max-width: 900px;
}

.tournament-card h2 {
    margin-top: 0;
    color: #ffffff;
}

.tournament-card p {
    margin: 12px 0;
}

/* Turnierkarte: zwei Spalten */
.tournament-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.tournament-info {
    min-width: 0;
}

.tournament-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tournament-actions p {
    margin: 0;
}

/* Smartphone-Ansicht */
@media (max-width: 650px) {
    .tournament-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Roter Anmeldebutton */
.register-button {
    display: block;
    padding: 12px 18px;
    background: #a94444;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.register-button:hover {
    background: #c05252;
    color: #ffffff;
}

/* Dunkelgrauer Teilnehmerlisten-Button */
.participants-button {
    display: block;
    padding: 12px 18px;
    background: #303338;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border: 1px solid #50545a;
    border-radius: 6px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.participants-button:hover {
    background: #45494f;
    color: #ffffff;
}

/* Anmeldebutton zuerst anzeigen */
.tournament-actions p:has(.register-button) {
    order: -1;
}

/* Hinweis bei geschlossener Anmeldung */
.registration-closed {
    display: block;
    padding: 12px 18px;
    background: #303338;
    color: #bfc3c7;
    border: 1px solid #50545a;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
}

/* Button zum Abmelden */
.cancel-button {
    display: block;
    padding: 12px 18px;
    background: #222427;
    color: #e0a0a0;
    border: 1px solid #a94444;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
}

.cancel-button:hover {
    background: #a94444;
    color: #ffffff;
}

/* Admin-Dashboard */
.admin-dashboard {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: #222427;
    border: 1px solid #a94444;
    border-radius: 10px;
    text-align: center;
}

.admin-dashboard h2 {
    color: #ffffff;
    margin-top: 25px;
}

.admin-dashboard p {
    color: #cccccc;
    line-height: 1.6;
}

.admin-dashboard .admin-action {
    display: inline-block;
    margin: 15px 0;
}

/* Admin – Turnier bearbeiten */
.admin-edit-card {
    max-width: 700px;
    margin: 40px auto;
    padding: 30px;
    background: #222427;
    border: 1px solid #a94444;
    border-radius: 10px;
}

.admin-edit-card h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 25px;
}

.admin-edit-card p {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Admin – Formulare für Turniere */

.admin-edit-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
}

.admin-edit-card input:not([type="hidden"]),
.admin-edit-card select {
    box-sizing: border-box;
    width: 100%;
    padding: 12px;
    background: #181a1c;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 6px;
    font-size: 16px;
}

.admin-edit-card input:focus,
.admin-edit-card select:focus {
    outline: none;
    border-color: #a94444;
}

.admin-edit-card button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: #a94444;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.admin-edit-card button[type="submit"]:hover {
    background: #8f3535;
}

/* Admin-Dashboard: Statistikkarten */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0 35px;
}

.dashboard-stat {
    background: #222;
    border: 1px solid #444;
    border-left: 4px solid #c62828;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.dashboard-stat span {
    display: block;
    color: #ccc;
    font-size: 14px;
    margin-bottom: 12px;
}

.dashboard-stat strong {
    display: block;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
}
