/* ============================================================
   Spielerprofil – gemeinsame Basis
   ============================================================ */

.spielerprofil-anlegen,
.spielerprofil {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0 40px;
}


/* ============================================================
   Überschriften
   ============================================================ */

.spielerprofil-anlegen h1,
.spielerprofil h1 {
    margin: 0 0 12px;
    font-size: 2rem;
    line-height: 1.2;
}


.spielerprofil-anlegen > p {
    margin: 0 0 28px;
    line-height: 1.6;
}


/* ============================================================
   Meldungen
   ============================================================ */

.meldung {
    margin: 0 0 24px;
    padding: 16px 18px;

    border-radius: 8px;
}


.meldung.fehler {
    border: 1px solid #c94a4a;
    background: #fff3f3;
}


.meldung.fehler strong {
    display: block;
    margin-bottom: 8px;
}


.meldung.fehler ul {
    margin: 0;
    padding-left: 20px;
}


.meldung.fehler li {
    margin-bottom: 4px;
}


.meldung.fehler li:last-child {
    margin-bottom: 0;
}


.meldung.erfolg {
    display: flex;
    flex-direction: column;
    gap: 4px;

    border: 1px solid #a7c5a7;
    background: #f2f8f2;
}


/* ============================================================
   Spielerprofil erstellen – Formularbereiche
   ============================================================ */

.formular-bereich {
    margin: 0 0 24px;
    padding: 24px;

    border: 1px solid #d8d8d8;
    border-radius: 10px;

    background: #fff;
}


.formular-bereich h2 {
    margin: 0 0 18px;

    font-size: 1.3rem;
    line-height: 1.3;
}


.formular-bereich > p {
    margin: 0 0 18px;

    line-height: 1.5;
}


/* ============================================================
   Formular – Zeilen und Felder
   ============================================================ */

.formular-zeile {
    display: flex;
    gap: 18px;

    margin-bottom: 18px;
}


.formular-zeile:last-child {
    margin-bottom: 0;
}


.formular-feld {
    flex: 1 1 0;

    min-width: 0;
}


.formular-feld-klein {
    flex: 0 0 180px;
}


.formular-feld-breit {
    flex: 1 1 auto;
}


.formular-feld label {
    display: block;

    margin-bottom: 6px;

    font-weight: 600;
}


/* ============================================================
   Formular – Inputs / Select
   ============================================================ */

.formular-feld input[type="text"],
.formular-feld input[type="date"],
.formular-feld select {
    box-sizing: border-box;

    width: 100%;
    min-height: 44px;

    padding: 10px 12px;

    border: 1px solid #bfc3c7;
    border-radius: 6px;

    background: #fff;

    font: inherit;
    line-height: 1.3;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.formular-feld input[type="text"]:focus,
.formular-feld input[type="date"]:focus,
.formular-feld select:focus {
    outline: none;

    border-color: #666;

    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.08);
}


/* ============================================================
   Formular – Hinweise
   ============================================================ */

.formular-hinweis {
    margin: 4px 0 0;
    padding: 12px 14px;

    border-radius: 6px;

    background: #f4f4f4;

    font-size: 0.92rem;
    line-height: 1.45;
}


/* ============================================================
   Öffentliche Darstellung im Anlageformular
   ============================================================ */

.radio-auswahl {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-bottom: 10px;
    padding: 14px 16px;

    border: 1px solid #d8d8d8;
    border-radius: 8px;

    cursor: pointer;

    transition:
        border-color 0.15s ease,
        background 0.15s ease;
}


.radio-auswahl:last-child {
    margin-bottom: 0;
}


.radio-auswahl:hover {
    background: #f7f7f7;
}


.radio-auswahl:has(input:checked) {
    border-color: #777;

    background: #f3f3f3;
}


.radio-auswahl input[type="radio"] {
    flex: 0 0 auto;

    margin: 3px 0 0;
}


.radio-auswahl span {
    min-width: 145px;

    font-weight: 600;
}


.radio-auswahl small {
    color: #666;

    line-height: 1.4;
}


/* ============================================================
   Spieler-ID Vorschau beim Anlegen
   ============================================================ */

.spieler-id-info {
    text-align: center;
}


.spieler-id-info p {
    max-width: 600px;

    margin-left: auto;
    margin-right: auto;
}


.spieler-id-beispiel {
    display: inline-block;

    margin-top: 4px;
    padding: 12px 22px;

    border: 1px dashed #aaa;
    border-radius: 8px;

    background: #f6f6f6;

    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}


/* ============================================================
   Formular – Aktion / Speichern
   ============================================================ */

.formular-aktion {
    display: flex;
    justify-content: flex-end;

    margin-top: 28px;
}


/* ============================================================
   Buttons allgemein innerhalb Spielerprofil
   ============================================================ */

.spielerprofil .button,
.spielerprofil-anlegen .button {
    display: inline-block;

    box-sizing: border-box;

    min-height: 44px;

    padding: 10px 16px;

    border: 0;
    border-radius: 7px;

    cursor: pointer;

    font: inherit;
    font-weight: 600;
    line-height: 1.3;

    text-decoration: none;
}


.spielerprofil .button-primary,
.spielerprofil-anlegen .button-primary {
    background: #555;
    color: #fff;
}


.spielerprofil .button-primary:hover,
.spielerprofil-anlegen .button-primary:hover {
    background: #444;
}


.spielerprofil .button-secondary {
    border: 1px solid #bbb;

    background: #fff;
    color: #333;
}


.spielerprofil .button-secondary:hover {
    background: #f3f3f3;
}


/* ============================================================
   Mein Spielerprofil – Kopfbereich
   ============================================================ */

.spielerprofil-kopf {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;

    margin-bottom: 24px;
}


.spielerprofil-kopf h1 {
    margin: 0 0 6px;
}


.spielerprofil-kopf p {
    margin: 0;

    line-height: 1.5;
}


/* ============================================================
   Spielerkarte
   ============================================================ */

.spielerkarte {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;

    margin-bottom: 24px;
    padding: 28px;

    border: 1px solid #d8d8d8;
    border-radius: 12px;

    background: #fff;
}


.spielerkarte-daten {
    flex: 1 1 auto;

    min-width: 0;
}


.spielerkarte-label {
    display: block;

    margin-bottom: 5px;

    font-size: 0.9rem;
    font-weight: 600;
}


.spielerkarte-id {
    margin-bottom: 10px;

    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}


.spielerkarte-name {
    margin-bottom: 15px;

    font-size: 1.2rem;
    font-weight: 600;
}


.spielerkarte-hinweis {
    max-width: 500px;

    margin: 0;

    line-height: 1.5;
}


.spielerkarte-qr {
    flex: 0 0 200px;

    text-align: center;
}


.spielerkarte-qr img,
.spielerkarte-qr canvas {
    display: block;

    max-width: 100%;
    height: auto;

    margin: 0 auto 8px;
}


.spielerkarte-qr span {
    display: block;

    font-size: 0.85rem;
}


/* ============================================================
   Mein Spielerprofil – Inhaltsbereiche
   ============================================================ */

.spielerprofil-bereich {
    margin-bottom: 24px;
    padding: 24px;

    border: 1px solid #d8d8d8;
    border-radius: 10px;

    background: #fff;
}


.spielerprofil-bereich-kopf {
    margin-bottom: 20px;
}


.spielerprofil-bereich-kopf h2 {
    margin: 0 0 5px;

    font-size: 1.3rem;
    line-height: 1.3;
}


.spielerprofil-bereich-kopf p {
    margin: 0;

    line-height: 1.45;
}


/* ============================================================
   Persönliche Daten / Anschrift
   ============================================================ */

.spielerprofil-daten {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 35px;

    margin: 0;
}


.spielerprofil-daten > div {
    padding: 14px 0;

    border-bottom: 1px solid #eeeeee;
}


.spielerprofil-daten dt {
    margin: 0 0 4px;

    font-size: 0.85rem;
    font-weight: 600;
}


.spielerprofil-daten dd {
    margin: 0;

    font-size: 1rem;
    line-height: 1.4;
}


.keine-angabe {
    color: #777;

    font-style: italic;
}


/* ============================================================
   Öffentliche Vorschau
   ============================================================ */

.oeffentliche-vorschau {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding: 18px;

    border-radius: 8px;

    background: #f4f4f4;
}


.oeffentliche-vorschau > span {
    margin-bottom: 5px;

    font-size: 0.85rem;
    font-weight: 600;
}


.oeffentliche-vorschau strong {
    margin-bottom: 4px;

    font-size: 1.4rem;
}


.oeffentliche-vorschau small {
    color: #666;

    font-size: 0.85rem;
}


/* ============================================================
   Turnierhistorie – Leerzustand
   ============================================================ */

.spielerprofil-leer {
    padding: 25px;

    border: 1px dashed #cccccc;
    border-radius: 8px;

    background: #f8f8f8;

    text-align: center;
}


.spielerprofil-leer strong {
    display: block;

    margin-bottom: 6px;
}


.spielerprofil-leer p {
    margin: 0;

    line-height: 1.5;
}


.spielerprofil-leer p + p {
    margin-top: 18px;
}


/* ============================================================
   Tablet / Mobile
   ============================================================ */

@media (max-width: 700px) {

    .spielerprofil-anlegen,
    .spielerprofil {
        padding-left: 12px;
        padding-right: 12px;
    }


    .spielerprofil-anlegen h1,
    .spielerprofil h1 {
        font-size: 1.65rem;
    }


    /* --------------------------------------------------------
       Formular
       -------------------------------------------------------- */

    .formular-bereich,
    .spielerprofil-bereich {
        padding: 18px;
    }


    .formular-zeile {
        display: block;

        margin-bottom: 0;
    }


    .formular-feld,
    .formular-feld-klein,
    .formular-feld-breit {
        width: 100%;

        margin-bottom: 16px;
    }


    .formular-zeile .formular-feld:last-child {
        margin-bottom: 16px;
    }


    .radio-auswahl {
        display: grid;
        grid-template-columns: auto 1fr;

        gap: 5px 10px;
    }


    .radio-auswahl input[type="radio"] {
        grid-row: 1 / span 2;
    }


    .radio-auswahl span {
        min-width: 0;
    }


    .radio-auswahl small {
        grid-column: 2;
    }


    .formular-aktion {
        display: block;
    }


    .formular-aktion .button {
        width: 100%;
    }


    .spieler-id-beispiel {
        font-size: 1.35rem;
    }


    /* --------------------------------------------------------
       Profilseite
       -------------------------------------------------------- */

    .spielerprofil-kopf {
        display: block;
    }


    .spielerprofil-kopf .button {
        width: 100%;

        margin-top: 16px;

        text-align: center;
    }


    .spielerkarte {
        display: block;

        padding: 20px;
    }


    .spielerkarte-id {
        font-size: 1.8rem;
    }


    .spielerkarte-qr {
        width: 200px;
        max-width: 100%;

        margin: 25px auto 0;
    }


    .spielerprofil-daten {
        display: block;
    }


    .spielerprofil-daten > div {
        border-bottom: 1px solid #eeeeee;
    }


    .spielerprofil-daten > div:last-child {
        border-bottom: 0;
    }

}


/* ============================================================
   Sehr kleine Displays
   ============================================================ */

@media (max-width: 420px) {

    .spielerprofil-anlegen,
    .spielerprofil {
        padding-left: 8px;
        padding-right: 8px;
    }


    .formular-bereich,
    .spielerprofil-bereich,
    .spielerkarte {
        padding: 16px;
    }


    .spielerkarte-id {
        font-size: 1.55rem;

        letter-spacing: 0.05em;
    }


    .oeffentliche-vorschau strong {
        font-size: 1.2rem;
    }

}