/* =========================================
   INTERNE TURNIERE
   ========================================= */

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}


/* =========================================
   KOPFBEREICH
   ========================================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.page-header h1 {
    margin: 0 0 6px 0;
    font-size: 30px;
}

.page-header p {
    margin: 0;
    color: #666;
    font-size: 15px;
}


/* =========================================
   BUTTONS
   ========================================= */

.btn-primary,
.btn-secondary {
    display: inline-block;
    text-decoration: none;
    border-radius: 6px;
    padding: 11px 18px;
    font-size: 15px;
    font-weight: bold;
}

.btn-primary {
    background: #1f6feb;
    color: #fff;
}

.btn-primary:hover {
    background: #1558b0;
}

.btn-secondary {
    background: #e9ecef;
    color: #222;
}

.btn-secondary:hover {
    background: #d6d9dc;
}


/* =========================================
   LEERE LISTE
   ========================================= */

.empty-box {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-box h3 {
    margin-top: 0;
}


/* =========================================
   TURNIER-LISTE
   ========================================= */

.tournament-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tournament-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}


/* =========================================
   TURNIER-INFORMATIONEN
   ========================================= */

.tournament-info {
    flex: 1;
}

.tournament-info h2 {
    margin: 0 0 10px 0;
    font-size: 21px;
}

.tournament-details {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #666;
    font-size: 14px;
}


/* =========================================
   STATUS
   ========================================= */

.tournament-status {
    white-space: nowrap;
}

.status-active,
.status-closed {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.status-active {
    background: #dff3e4;
    color: #217a3a;
}

.status-closed {
    background: #eee;
    color: #666;
}


/* =========================================
   AKTIONEN
   ========================================= */

.tournament-actions {
    white-space: nowrap;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {

    .container {
        padding: 20px 12px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header h1 {
        font-size: 25px;
    }

    .btn-primary {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .tournament-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .tournament-details {
        flex-direction: column;
        gap: 7px;
    }

    .tournament-actions {
        width: 100%;
    }

    .btn-secondary {
        display: block;
        text-align: center;
    }
}
/* =========================================
   FORMULAR – NEUES TURNIER
   ========================================= */

.form-card {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #1f6feb;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}


/* =========================================
   HINWEIS / FEHLER
   ========================================= */

.error-box {
    background: #fde2e2;
    color: #a52828;
    border: 1px solid #f1b5b5;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 14px;
}

.info-box {
    background: #f1f3f5;
    border-radius: 6px;
    padding: 13px 15px;
    margin-bottom: 25px;
    font-size: 14px;
}


/* =========================================
   FORMULAR BUTTONS
   ========================================= */

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}
/* =========================================
   SPIELMODUS BUTTONS
   ========================================= */

.spielmodus-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.spielmodus-button {
    display: inline-block;
    padding: 12px 20px;
    background: #1f6feb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
}

.spielmodus-button:hover {
    background: #1558b0;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {

    .form-card {
        padding: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}

/* =========================================
   SPIELMODUS BUTTONS
   ========================================= */

.spielmodus-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.spielmodus-button {
    display: inline-block;
    padding: 12px 20px;
    background: #1f6feb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
}

.spielmodus-button:hover {
    background: #1558b0;
}

@media (max-width: 700px) {

    .spielmodus-buttons {
        flex-direction: column;
    }

    .spielmodus-button {
        width: 100%;
        box-sizing: border-box;
    }

}


/* =========================================
   WINTERTURNIER – SCOREKARTE
   ========================================= */

.internal-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.internal-info-grid > div {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 15px;
    line-height: 1.5;
}


/* =========================================
   SCORETABELLE
   ========================================= */

.winter-score-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
}

.winter-score-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    background: #fff;
}

.winter-score-table th,
.winter-score-table td {
    border: 1px solid #ccc;
    padding: 7px;
    text-align: center;
}

.winter-score-table th {
    background: #e9f3e9;
    font-weight: bold;
}

.winter-score-table td:first-child {
    background: #f5f5f5;
    width: 75px;
}


/* =========================================
   SCHLAG-EINGABE
   ========================================= */

.winter-score-input {
    width: 48px;
    height: 40px;
    box-sizing: border-box;
    padding: 4px;
    border: 1px solid #aaa;
    border-radius: 4px;
    text-align: center;
    font-size: 17px;
    font-weight: bold;
    background: #fff;
}

.winter-score-input:focus {
    outline: none;
    border-color: #1f6feb;
    box-shadow: 0 0 0 2px rgba(31,111,235,0.15);
}


/* =========================================
   TOTAL
   ========================================= */

.winter-total {
    background: #e9f3e9 !important;
    font-size: 18px;
    font-weight: bold;
}


/* =========================================
   DOPPELRUNDE
   ========================================= */

.winter-gesamt-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.winter-gesamt-box > div {
    background: #e9f3e9;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 18px;
    text-align: center;
    font-size: 17px;
}

.winter-gesamt-box strong {
    display: block;
    margin-top: 6px;
    font-size: 24px;
}


/* =========================================
   HINWEIS
   ========================================= */

.internal-hinweis {
    margin-top: 18px;
    padding: 12px 15px;
    background: #f5f5f5;
    border-left: 4px solid #1f6feb;
    line-height: 1.5;
}


/* =========================================
   BUTTON-REIHE
   ========================================= */

.internal-button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* =========================================
   HANDY
   ========================================= */

@media (max-width: 700px) {

    .internal-info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .winter-score-table-wrapper {
        overflow-x: auto;
    }

    .winter-score-table {
        min-width: 1050px;
    }

    .winter-score-input {
        width: 50px;
        height: 44px;
        font-size: 18px;
    }

    .winter-gesamt-box {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .internal-button-row {
        flex-direction: column;
    }

    .internal-button-row .button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

}
/* =========================================
   TURNIERSTEUERUNG
   ========================================= */

.admin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.admin-grid .button {
    display: block;
    padding: 13px 16px;
    background: #1f6feb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    box-sizing: border-box;
}

.admin-grid .button:hover {
    background: #1558b0;
}


/* =========================================
   TURNIERSTEUERUNG – MOBILE
   ========================================= */

@media (max-width: 700px) {

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid .button {
        width: 100%;
    }

}