/* TTR Rechner App Stylesheet */
.btn,
.btn:link,
.btn:visited {
    text-decoration: none !important;
}

body {
    background: #f4f7fa;
    color: #222;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 480px;
    margin: 0 auto 0 auto;
    background: #fff;
    border-radius: 0 0 0 0;
    /* Nur unten runde Ecken */
    box-shadow: 0 4px 18px rgba(60, 156, 222, 0.10);
    padding: 32px 18px 18px 18px;
}

h1 {
    color: #3B973B;
    font-size: 2rem;
    margin-bottom: 22px;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
}

.form-row {
    display: flex;
    justify-content: space-between;
    /* links Label, rechts Input */
    align-items: center;
    /* vertikal zentriert */
    margin-top: 15px;
    margin-bottom: 5px;
    align-items: baseline;
}

/* Label linksbündig */
.form-row label {
    font-weight: 500;
    /* ggf. feste Breite, damit alle Inputs überall gleich starten */
    width: 250px;
    /* anpassen, oder ganz weglassen */
    text-align: left;
}

/* Input nach rechts schieben und Größe beibehalten */
.form-row input[type="number"] {
    width: 30%;
    height: 25px;
    padding: 12px;
    border-radius: 12px;
    border: 1.5px solid #b3d3b3;
    font-size: 1.08rem;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}

.form-row input[type="number"]:focus {
    border: 2px solid #3B973B;
    outline: none;
    background: #f3fff3;
}

.form-row input[type="date"] {
    padding: 0 0.75rem;
    font-size: 1rem;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    /* Native Pfeile/Picker-Icon ausblenden */
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

form label {
    display: inline;
    font-weight: 500;
    margin-bottom: 5px;
    margin-top: 15px;
}

input[type="number"] {
    width: 30%;
    height: 25px;
    padding: 12px;
    border-radius: 12px;
    border: 1.5px solid #b3d3b3;
    font-size: 1.08rem;
    margin-bottom: 5px;
    background: #f8faf8;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input[type="number"]:focus {
    border: 2px solid #3B973B;
    outline: none;
    background: #f3fff3;
}

input[type="checkbox"] {
    accent-color: #3B973B;
    margin-right: 7px;
    transform: scale(1.2);
}

/*
button,
input[type="submit"] {
    background: #3B973B;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 5px 10px;
    font-size: 1.08rem;
    font-weight: 600;
    margin-top: 14px;
    margin-right: 10px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(60, 156, 222, 0.06);
    transition: background 0.15s, box-shadow 0.15s;
}

button:hover,
input[type="submit"]:hover {
    background: #358c35;
    box-shadow: 0 4px 14px rgba(60, 156, 222, 0.12);
}
*/
/* Grund-Styles für Buttons */
button,
input[type="submit"] {
    background: #f8faf8;
    color: #000;
    border-radius: 3px;
    border: none;
    padding: 5px 10px;
    font-size: 1.0rem;
    font-weight: 600;
    margin-top: 5px;
    margin-right: 5px;
    cursor: pointer;
    box-shadow: inset 0 0 0 0.5px #3B973B,
        0 2px 10px rgba(60, 156, 222, 0.06);
    transition: background 0.35s, box-shadow 0.35s, color 0.35s;
}

/* Hover-Zustand */
button:hover,
input[type="submit"]:hover {
    background: #3B973B;
    color: #fff;
    box-shadow: 0 4px 14px rgba(60, 156, 222, 0.12);
}

/* Wrapper-Klasse für Buttons mit SVG-Icon */
.button-with-svg {
    display: flex;
    align-items: center;
    /* Vertikale Zentrierung von Icon und Text */
    justify-content: center;
    /* Horizontale Zentrierung */
    padding: 10px 20px;
    /* Angepasste Innenabstände */
}

/* SVG-Icon erbt die Textfarbe und animiert Farbwechsel */
.button-with-svg svg {
    fill: currentColor;
    transition: fill 0.35s;
    margin-right: 8px;
    /* Abstand zwischen Icon und Text */
}

.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: 0;
}

.sr-only {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: 0;
}

.btn {
    background: #f8faf8;
    color: #000;
    border-radius: 3px;
    border: none;
    padding: 5px 10px;
    font-size: 1.0rem;
    font-weight: 600;
    margin-top: 5px;
    margin-right: 5px;
    cursor: pointer;
    box-shadow: inset 0 0 0 0.5px #3B973B,
        0 2px 10px rgba(60, 156, 222, 0.06);
    transition: background 0.35s, box-shadow 0.35s, color 0.35s;
}

.btn:hover {
    background: #3B973B;
    color: #fff;
    box-shadow: 0 4px 14px rgba(60, 156, 222, 0.12);
}


#gegnerList .gegner-row {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    gap: 30px;
    padding: 1px 0;
}

#gegnerList label {
    margin: 0;
    font-weight: 400;
}

#gegnerList label.switch {
    flex: 0 0 auto;
}

#gegnerList input.gegnerTTR {
    width: 100px;
    height: 25px;
}

#gegnerList .header {
    font-weight: 600;
    background: #f3f7f3;
    padding: 4px 0;
}


#gegnerList .header {
    font-weight: 600;
    background: #f3f7f3;
    padding: 4px 0;
    align-items: center;
    display: flex;
}

#gegnerList .gegner-title small {
    font-size: 0.75rem;
    font-weight: 400;
}

#result {
    margin-top: 28px;
    padding: 18px;
    background: #eaf4ea;
    border-radius: 13px;
    box-shadow: 0 2px 6px rgba(60, 156, 222, 0.06);
    color: #1a4d1a;
    font-size: 1.08rem;
    min-height: 44px;
    word-break: break-word;
}

#result table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

#result th,
#result td {
    text-align: center;
    padding: 8px 4px;
    border-bottom: 1px solid #b7e2b7;
}

#result th {
    background: #3B973B;
    color: #fff;
    font-weight: 600;
    font-size: 1.03rem;
    letter-spacing: 0.5px;
    border-radius: 7px 7px 0 0;
}

#result tr:last-child td {
    border-bottom: none;
}

footer {
    margin-top: 36px;
    text-align: center;
    font-size: 0.95rem;
    color: #7fa87f;
}

footer a {
    color: #3c9cde;
    text-decoration: underline;
    transition: color 0.15s;
}

footer a:hover {
    color: #3472af;
}

.switch-wrapper {
    display: flex;
    align-items: center;
    /* Vertikal mittig! */
    gap: 50px;
    /* Abstand zwischen Text und Switch */
    margin-bottom: 0px;
    /* Platz zu nächsten Element */
}


.switch-label {
    min-width: 60px;
    font-size: 1.04rem;
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 25px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #f6b3b3;
    /* Rot für Nein */
    border-radius: 30px;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: .4s;
    box-shadow: 0 2px 6px rgba(60, 156, 222, 0.10);
}

.switch input:checked+.slider {
    background-color: #8bdf8b;
    /* Grün für Ja */
}

.switch input:checked+.slider:before {
    transform: translateX(26px);
}

/* Text Ja/Nein auf dem Switch */
.switch .onoff {
    position: absolute;
    top: 4px;
    left: 10px;
    font-size: 0.95rem;
    color: #3d3d3d;
    font-weight: 600;
    pointer-events: none;
    transition: color .4s;
}

.switch input:checked+.slider .onoff {
    left: 30px;
    color: #000;
}

.switch .onoff.no {
    display: block;
    left: 10px;
}

.switch input:checked+.slider .onoff.no {
    display: none;
}

.switch .onoff.yes {
    display: none;
    left: 30px;
}

.switch input:checked+.slider .onoff.yes {
    display: block;
}

.ttr-header {
    width: 100%;
    background: #3B973B;
    padding: 0;
    margin: 0;
    box-shadow: none;
    display: flex;
    justify-content: center;
}

.ttr-header-inner {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #3B973B;
    margin: 0;
    border-radius: 0 0 0 0;
    box-shadow: 0 2px 8px rgba(60, 156, 222, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    min-height: 56px;
}

.ttr-title {
    color: #fff;
    font-size: 1.14rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: left;
    flex: 1 1 auto;
}

.ttr-user-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex-shrink: 0;
}

.ttr-user-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.ttr-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ttr-version {
    font-size: 0.80rem;
    font-weight: 400;
    margin-right: 4px;
    letter-spacing: 0.5px;
    opacity: 0.8;
}


.ttr-back-btn {
    background: none;
    border: none;
    padding: 4px;
    margin-left: auto;
    margin-right: 0;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ttr-back-btn:active {
    opacity: 0.7;
}


.ttr-back-btn svg {
    display: block;
    width: 20px;
    height: 20px;
}

.ttr-nav {
    display: none;
    position: absolute;
    top: 54px;
    right: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(60, 156, 222, 0.13);
    min-width: 180px;
    z-index: 999;
    flex-direction: column;
    padding: 12px 0;
}

.ttr-nav.show {
    display: flex;
}

.ttr-nav a {
    color: #222;
    text-decoration: none;
    font-size: 1.06rem;
    padding: 10px 22px;
    transition: background 0.13s;
    border: none;
    background: none;
    text-align: left;
}

.ttr-nav a:hover {
    background: #f0f7f0;
    color: #3B973B;
}

.ttr-logout-link {
    color: #e74c3c !important;
    font-weight: bold;
}

.ttr-logout-link:hover {
    background: #fff0f0;
    color: #fff;
}



h2 {
    color: #3B973B;
    text-align: center;
    margin-bottom: 24px;
}



.gegner-form .form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 13px;
}

.gegner-form label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #255b30;
}

.gegner-form .kontaktinfo-input:focus,
.gegner-form .kontaktinfo-input:valid,
.gegner-form .kontaktinfo-input:-webkit-autofill {
    box-shadow: none;
    outline: none;
    border-color: #b3d3b3 !important;
    background: #f8faf8 !important;
}

.gegner-form input[type="text"],
.gegner-form input[type="number"],
.gegner-form input[type="email"],
.gegner-form textarea {
    border: 1.5px solid #b3d3b3;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 1.02rem;
    background: #f8faf8;
    resize: vertical;
}

.gegner-form textarea {
    min-height: 38px;
}

/* Kontaktinfo specific inputs */
.kontaktinfo-input {
    width: 80%;
}

.gegner-form .form-btn-row {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 15px;
}

.btn-cancel,
.btn-save {
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-cancel {
    background: #e94e4e;
    color: #fff;
}

.btn-cancel:hover {
    background: #d43c3c;
}

.btn-save {
    background: #3B973B;
    color: #fff;
}

.btn-save:hover {
    background: #257b25;
}

.form-error {
    display: flex;
    /* macht das Element zum Flex-Container */
    justify-content: center;
    /* zentriert horizontal */
    align-items: center;
    /* zentriert vertikal */
    text-align: center;
    /* für den Fall mehrzeiliger Texte */
    color: #ff2a11;
    font-size: 1.0rem;
    margin-top: 8px;
    min-height: 22px;
    border-radius: 6px;
    font-weight: bold;
}



.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px 4px;
    margin-left: 4px;
    margin-right: 4px;
    transition: background 0.14s;
    border-radius: 6px;
}

.icon-btn:hover {
    background: #f4f4f4;
}

.icon-btn svg {
    color: #3B973B;
    /* oder #3B973B für dein App-Grün */
}

.no-shadow {
    box-shadow: none !important;
    transition: none !important;
}

@keyframes popupfade {
    from {
        opacity: 0;
        transform: translateY(-25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}






@media (max-width: 600px) {
    .ttr-header-inner {
        max-width: 100vw;
        min-height: 44px;
        padding: 0 6vw;
    }

    .ttr-title {
        font-size: 1.03rem;
    }


    .ttr-user-link {
        width: 28px;
        height: 28px;
        margin-right: 6px;
    }

    .ttr-back-btn svg {
        width: 20px;
        height: 20px;
    }

    .ttr-version {
        font-size: 0.68rem;
    }
}


/* Responsive */
@media (max-width: 600px) {
    .container {
        max-width: 98vw;
        margin: 0 2vw 0 2vw;
        /* Kein Abstand oben! */
        padding: 20px 5vw 12px 5vw;
        border-radius: 0 0 0 0;
        /* Unten rund, oben eckig */
    }

    h1 {
        font-size: 1.35rem;
    }

    button,
    input[type="submit"] {
        width: 100%;
        margin-right: 0;
        margin-bottom: 9px;
    }

    #result {
        font-size: 1rem;
        padding: 12px 4px;
    }
}


/* --- Styles previously defined inline --- */
/* Delete/Privacy confirmation boxes */
.del-box {
    max-width: 420px;
    margin: 55px auto;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 4px 22px #3b973b1c;
    padding: 36px 25px 25px 25px;
}

.del-box h2 {
    color: #e94e4e;
    text-align: center;
    margin-bottom: 24px;
}

.del-box .warn {
    color: #e94e4e;
    font-size: 1.05em;
    background: #fff2f2;
    border-radius: 7px;
    padding: 9px 14px;
    margin-bottom: 20px;
}

.del-box .msg {
    color: #257b25;
    background: #eaf4ea;
    border-radius: 7px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.del-box .error {
    color: #e74c3c;
    background: #ffecec;
    border-radius: 7px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.del-box label {
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
    display: block;
}

.del-box input[type="text"] {
    border-radius: 8px;
    border: 1.5px solid #b3d3b3;
    background: #f8faf8;
    padding: 7px 12px;
    font-size: 1.04em;
    margin-bottom: 13px;
}

.del-box button {
    border-radius: 10px;
    background: #e94e4e;
    color: #fff;
    font-weight: 600;
    padding: 8px 18px;
    border: none;
    cursor: pointer;
    font-size: 1.06em;
}

.del-box button:hover {
    background: #c0392b;
}

/* Gegnerliste und Suche */
.search-area {
    margin-bottom: 28px;
}

.search-label {
    font-weight: 600;
    color: #255b30;
    margin-bottom: 8px;
    display: block;
}

.search-input {
    width: 98%;
    max-width: 340px;
    padding: 8px 12px;
    border-radius: 9px;
    border: 1.2px solid #b3d3b3;
    margin-bottom: 5px;
    font-size: 1.08rem;
    background: #f8faf8;
}

.qttr-results,
.gegner-liste {
    margin-top: 14px;
}

.gegner-liste {
    max-height: 60vh;
    overflow-y: auto;
}

.qttr-row,
.gegner-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e4e7eb;
    padding: 4px 0;
    gap: 0;
}

.col-name {
    flex: 1 1 0;
    min-width: 80px;
    max-width: 220px;
}

.col-verein {
    flex: 1 1 0;
    min-width: 60px;
    max-width: 180px;
}

.col-ttr {
    flex: 1 1 0;
    min-width: 55px;
    max-width: 70px;
}

.gegner-actions {
    flex: 1 1 0;
    min-width: 80px;
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 6px;
    justify-content: end;
    align-items: center;
}

.col-actions {
    flex: 1 1 0;
    min-width: 80px;
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    align-items: center;
}

.qttr-row>div,
.gegner-row>span {
    white-space: normal !important;
    word-break: break-word !important;
    gap: 2px;
    min-width: 0;
    max-width: 90%;
}

.qttr-row .btn-add {
    background: #3B973B;
    color: #fff;
    border-radius: 8px;
    font-size: 0.77rem;
    font-weight: 700;
    padding: 4px 4px;
    border: none;
    cursor: pointer;
    transition: background 0.13s;
}

.qttr-row .btn-add:hover {
    background: #257b25;
}

.gegner-row .icon-btn:active {
    opacity: 0.6;
}

.icon-btn[title="Gegner löschen"]:hover svg {
    stroke: #e94e4e;
}

.gegner-empty,
.qttr-empty {
    color: #888;
    margin: 14px 0;
}

.qttr-more {
    color: #888;
    margin: 10px 0;
}

.success-msg {
    background: #eaf4ea;
    color: #266b28;
    padding: 9px 18px;
    border-radius: 9px;
    margin-bottom: 13px;
    font-weight: 500;
    font-size: 1.01rem;
    text-align: center;
}

/* Ergebnis Formular */
.ergebnis-form {
    max-width: 410px;
    margin: 0 auto 38px auto;
}

.ergebnis-form .form-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.satz-row.hidden {
    display: none;
}

.satz-label {
    width: 55px;
}

.satz-input {
    width: 42px;
    text-align: center;
}

.satz-vs {
    font-weight: 600;
    color: #6a6a6a;
    font-size: 1.2em;
}

.vergangene-tabelle {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-collapse: collapse;
}

.vergangene-tabelle th,
.vergangene-tabelle td {
    border-bottom: 1px solid #eee;
    text-align: center;
}

.vergangene-tabelle th {
    background: #f6f6fa;
    color: #2d592d;
}

.action-bar {
    display: none;
    text-align: left;
}

.table-action-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 10px;
}

.action-bar select {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #b7dfc2;
}

.top-bar {
    display: flex;
    justify-content: center;
    /* horizontal zentrieren */
    align-items: center;
    /* vertikal zentrieren */
    /* optional: feste Höhe, damit align-items wirkt */
    height: 60px;
}

.top-bar-stats {
    display: flex;
    justify-content: center;
    /* horizontal zentrieren */
    align-items: center;
    /* vertikal zentrieren */
    /* optional: feste Höhe, damit align-items wirkt */
    height: 41px;
}

/* Label und Select auf dieselbe Höhe bringen */
.top-bar label,
.top-bar select {
    height: 1.5rem;
    /* feste Höhe */
    line-height: 1.5rem;
    /* vertikale Zentrierung des Textes */
}

/* Reset-Margin im Formular */
.top-bar form {
    margin: 0;
}

/* Schöner Style für das Dropdown */
.top-bar select {
    padding: 0 0.75rem;
    /* innenabstand links/rechts */
    font-size: 0.88rem;
    /* Schriftgröße */
    color: #333;
    /* Textfarbe */
    background-color: #fff;
    /* Hintergrund */
    border: 1px solid #ccc;
    /* Rahmen */
    border-radius: 0.375rem;
    /* abgerundete Ecken */
    appearance: none;
    /* native Pfeil ausblenden */
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    cursor: pointer;
    transition: border-color 0.2s;
}

/* Hover- und Focus-Styles */
.top-bar select:hover {
    border-color: #999;
}

.top-bar select:focus {
    outline: none;
    border-color: #007BFF;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}


/* Gegner Detailansicht */
.gegner-view-box {
    max-width: 440px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(60, 156, 222, 0.11);
    padding: 30px 22px 22px 22px;
    font-size: 1.08rem;
}

.gegner-view-row {
    display: flex;
    gap: 13px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.gegner-view-label {
    min-width: 110px;
    font-weight: 600;
    color: #255b30;
}

.gegner-view-value {
    flex: 1 1 0;
    color: #234;
    word-break: break-word;
    white-space: pre-line;
}

.gegner-view-box h2 {
    text-align: center;
    color: #3B973B;
    font-size: 1.24rem;
    margin-bottom: 26px;
}

.view-btn-row {
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-top: 26px;
}

.view-btn-row-close {
    justify-content: center;
}

.btn-close,
.btn-edit {
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background 0.15s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-close {
    background: #e94e4e;
    color: #fff;
}

.btn-close:hover {
    background: #d43c3c;
}

.btn-edit {
    background: #3B973B;
    color: #fff;
}

.btn-edit:hover {
    background: #257b25;
}

.view-btn-row .btn-edit {
    padding: 6px 14px;
    font-size: 0.9rem;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .gegner-view-box {
        max-width: 99vw;
        padding: 15px 3vw;
    }

    .view-btn-row {
        justify-content: space-between;
    }
}

/* Statistik Seite */
.stats-container {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 4px 22px #3b973b1c;
}

.stats-header {
    font-size: 1.2em;
    color: #3B973B;
    font-weight: 700;
    margin-bottom: 18px;
    margin-top: 4px;

}

.stats-table {
    width: 100%;
    border-spacing: 0;
    margin-bottom: 30px;
}

.stats-table td {
    padding: 7px 5px;
    font-size: 1.07em;
    color: #255b30;
}

.stat-label {
    font-weight: 600;
}

.stat-value {
    font-weight: 700;
}

.ratio-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.ratio-box {
    border: 1px solid #3B973B;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    color: #255b30;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.chart-row {
    display: flex;
    gap: 50px;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    flex-direction: column;

}

.chart-container {
    height: 300px;
    width: 300px;
    max-width: 300px;
}

.chart-container canvas {
    background: #f8faf8;
    border-radius: 12px;
}

.chart-snapshot {
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 8px auto;
}

.stat-hr {
    border: none;
    border-top: 1px solid #e5eae5;
    margin: 20px 0 12px 0;
}

@media (max-width: 600px) {
    .stats-container {
        max-width: 99vw;
        padding: 0 2vw;
    }

    .chart-row {
        flex-direction: column;
        gap: 50px;
    }
}

/* TTR Verlauf */
.ttr-table {
    width: 100%;
    margin: 0 auto 30px auto;
    border-collapse: collapse;
}

.ttr-table th,
.ttr-table td {
    padding: 9px 12px;
    text-align: center;
    border-bottom: 1px solid #e3e3e3;
}

.ttr-table th {
    background: #3B973B;
    color: #fff;
    font-weight: 600;
}

.ttr-table tr:last-child td {
    border-bottom: none;
}

.ttr-chart-wrap {
    max-width: 480px;
    margin: 0 auto 32px auto;
    background: #fff;
    padding: 20px 10px;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 18px rgba(60, 156, 222, 0.09);
}

/* FAQ Seite */
.faq-nav {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 10px 0;
    z-index: 10;
}

.faq-nav ul {
    list-style: none;
    padding: 0;
}

.faq-nav li {
    margin-bottom: 5px;
}

.faq-nav a {
    text-decoration: none;
    color: #333;
}

.faq-section {
    margin-top: 40px;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3B973B;
    color: #fff;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

pre {
    background: #eee;
    padding: 10px;
    overflow-x: auto;
}

/* Benutzerseite */
.user-area {
    max-width: 420px;
    margin: 40px auto;
    background: #fff;
    border-radius: 16px;
    padding: 28px 22px;
    box-shadow: 0 2px 14px rgba(60, 156, 222, 0.09);
}

.user-area h2 {
    font-size: 1.3rem;
    color: #3B973B;
    margin-bottom: 22px;
}

.user-btns button,
.user-btns a {
    width: 100%;
    margin-bottom: 13px;
    font-size: 1.09rem;
}


.dialog-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 40, 50, .25);
    z-index: 1111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog {
    background: #fff;
    padding: 26px 22px 22px 22px;
    border-radius: 13px;
    max-width: 350px;
    width: 96vw;
    box-shadow: 0 2px 22px rgba(60, 156, 222, 0.13);
    box-sizing: border-box;
    overflow: hidden;
    word-break: break-word;
}

.dialog h3 {
    margin-top: 0;
    font-size: 1.17rem;
    color: #3B973B;
}

.dialog label {
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.dialog input[type="text"],
.dialog input[type="email"],
.dialog input[type="password"] {
    width: 100%;
    padding: 9px 11px;
    margin-bottom: 13px;
    border-radius: 8px;
    border: 1px solid #b7dfc2;
    font-size: 1rem;
    box-sizing: border-box;
    display: block;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 4px;
}

.dialog-actions button {
    min-width: 90px;
}

.dialog-error {
    color: #e74c3c;
    font-size: 0.97rem;
    margin-bottom: 6px;
    min-height: 19px;
}

@media (max-width: 440px) {

    .user-area,
    .dialog {
        max-width: 99vw;
        padding: 18px 6vw 16px 6vw;
    }
}

/* Passwort zurücksetzen */
.reset-container {
    max-width: 350px;
    margin: 50px auto;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 4px 22px #3b973b1c;
    padding: 36px 25px 25px 25px;
}

.contact-container {
    max-width: 350px;
    margin: 50px auto;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 4px 22px #3b973b1c;
    padding: 36px 25px 25px 25px;
}

.contact-container h2 {
    color: #3B973B;
    text-align: center;
    margin-bottom: 27px;
}

.contact-container label {
    font-weight: 600;
    color: #255b30;
    margin-bottom: 3px;
    display: block;
}

.contact-container input[type="text"],
.contact-container input[type="email"],
.contact-container textarea {
    border-radius: 8px;
    border: 1.5px solid #b3d3b3;
    background: #f8faf8;
    padding: 7px 12px;
    font-size: 1.04em;
    margin-bottom: 13px;
}

.contact-container textarea {
    min-height: 80px;
}

.contact-container button {
    background: #fff;
    color: #000;
    border-radius: 3px;
    padding: 5px 10px;
    font-size: 1.0rem;
    font-weight: 600;
    margin-top: 5px;
    margin-right: 5px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(60, 156, 222, 0.06);
    transition: background 0.35s, box-shadow 0.35s;
}

.contact-container button:hover {
    background: #3B973B;
    color: #fff;
    box-shadow: 0 4px 14px rgba(60, 156, 222, 0.12);
}

.contact-container .msg {
    color: #257b25;
    background: #eaf4ea;
    border-radius: 7px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.contact-container .error {
    color: #e74c3c;
    background: #ffecec;
    border-radius: 7px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.reset-container h2 {
    color: #3B973B;
    text-align: center;
    margin-bottom: 27px;
}

.reset-container label {
    font-weight: 600;
    color: #255b30;
    margin-bottom: 3px;
    display: block;
}

.reset-container input[type="text"],
.reset-container input[type="email"],
.reset-container input[type="password"] {
    border-radius: 8px;
    border: 1.5px solid #b3d3b3;
    background: #f8faf8;
    padding: 7px 12px;
    font-size: 1.04em;
    margin-bottom: 13px;
    height: 25px;
}

.reset-container button {
    border-radius: 10px;
    background: #3B973B;
    color: #fff;
    font-weight: 600;
    padding: 8px 18px;
    border: none;
    cursor: pointer;
    font-size: 1.04em;
}

.reset-container button:hover {
    background: #257b25;
}

.reset-container .msg {
    color: #257b25;
    background: #eaf4ea;
    border-radius: 7px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.reset-container .error {
    color: #e74c3c;
    background: #ffecec;
    border-radius: 7px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

/* Registrierungs-Erfolg */
.success-area {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    border-radius: 16px;
    padding: 28px 22px;
    box-shadow: 0 2px 14px rgba(60, 156, 222, 0.09);
    text-align: center;
}

.success-area h2 {
    color: #3B973B;
}

.success-area p {
    margin: 22px 0;
    font-size: 1.11rem;
}

.success-area button {
    background: #3B973B;
    color: #fff;
    border-radius: 8px;
    border: none;
    font-size: 1.07rem;
    padding: 10px 24px;
    cursor: pointer;
}

/* Hinweise und Dropdowns */
.info-hint {
    background: #f6f7fb;
    color: #2a343e;
    border-radius: 13px;
    padding: 14px 18px;
    box-shadow: 0 2px 10px rgba(60, 156, 222, 0.05);
    font-size: 1.07em;
    text-align: center;
    font-weight: 500;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.howto-item.hidden {
    display: none;
}

#howtoSelect {
    width: 100%;
    padding: 12px;
    font-size: 1.05rem;
    border-radius: 12px;
    border: 1.5px solid #b3d3b3;
    background: #f8faf8;
    margin: 10px 0 18px 0;
}


.gegner-dropdown {
    position: absolute;
    z-index: 9999;
    background: #fff;
    border: 1px solid #b3d3b3;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(60, 156, 222, 0.11);
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
}

.gegner-dropdown div:hover {
    background: #f2faf2;
}


/* Hinweis bei benutzereingetragenem TTR */
.ttr-warning-flag {
    color: #e94e4e;
    font-weight: bold;
    margin-left: 4px;
}

.ttr-warning-note {
    color: #e94e4e;
    font-size: 0.95rem;
    text-align: center;
    margin-top: 10px;
}

/* Action sheet for Profilbild-Auswahl */
.sheet-bg {
    position: fixed;
    inset: 0;
    background: rgba(30, 40, 50, .25);
    z-index: 1111;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
}

.sheet {
    background: #6e706e;
    width: 100%;
    max-width: 420px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 16px rgba(60, 156, 222, 0.13);
    box-sizing: border-box;
    padding: 6px 0;
}

.sheet button {
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: none;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
}

.sheet button:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

.sheet button:hover {
    background: #515050;
}

/* Overlay für Kameraaufnahme */
.camera-bg {
    position: fixed;
    inset: 0;
    background: rgba(30, 40, 50, .25);
    z-index: 1112;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-box {
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(60, 156, 222, 0.13);
    max-width: 420px;
    width: 96vw;
    box-sizing: border-box;
    text-align: center;
}

.camera-box video {
    width: 100%;
    border-radius: 8px;
    background: #000;
}

.camera-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    gap: 10px;
}

.camera-actions button {
    flex: 1 1 auto;
}

/* Button group for add/remove opponent actions */
.gegner-buttons {
    display: flex !important;
    gap: 10px;
    margin-top: 8px;
}

.menu-box {
    margin: 16px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.menu-box .account-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-box .account-menu li {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-box .account-menu li:last-child {
    border-bottom: none;
}

.menu-box .account-menu li:hover {
    background: #3B973B;
}

.menu-box .account-menu li:hover .label,
.menu-box .account-menu li:hover .value,
.menu-box .account-menu li:hover svg.arrow {
    color: #fff;
    fill: #fff;
}

.menu-box .account-menu .label {
    flex: 0 0 auto;
    font-size: 1.05rem;
}

.menu-box .account-menu .value {
    margin-left: auto;
    margin-right: 2px;
}

.arrow {
    width: 16px;
    height: 16px;
    fill: #b0b0b0;
}

.profile-header {
    text-align: center;
    padding: 24px 0 16px;
}

.profile-photo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
}

.profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #3B973B;
}

.edit-sheet .edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;
    background: #6e706e;
    color: #fff;
}

.edit-sheet .edit-header button {
    background: none;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.edit-sheet .edit-title {
    font-weight: 600;
}

.edit-sheet .edit-body {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 6px;
}

.edit-sheet input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #b3d3b3;
    border-radius: 8px;
    font-size: 1rem;
}

.edit-sheet .clear-btn {
    background: none;
    border: none;
    padding: 0px;
    width: 20px;
    height: 20px;
}

.edit-sheet .clear-btn svg {
    width: 20px;
    height: 20px;
    fill: #cda2a2;
}

.edit-sheet .form-error {
    margin: 8px 16px;
}

.edit-sheet {
    /* Breite anpassen, damit die Header-Elemente sich auf der vollen Breite verteilen */
    width: 90%;
    max-width: 400px;
    margin: 80px auto;
    /* oder was immer Dir für das Modal gefällt */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.edit-sheet .edit-header {
    position: relative;
    /* für das absolute Zentrieren des Titels */
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Buttons ganz außen */
    padding: 10px 16px;
    border-bottom: 1px solid #e0e0e0;

}

.edit-sheet .edit-header .edit-title {
    position: absolute;
    /* raus aus dem Flex-Flow */
    left: 50%;
    /* Mitte des Containers */
    transform: translateX(-50%);
    /* wirklich zentrieren */
    font-weight: 600;
}

.edit-sheet .edit-header button {
    background: none;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.edit-sheet .edit-footer {
    display: flex;
    justify-content: space-between;
    /* Buttons an die Enden */
    padding: 10px 16px;
}

.edit-sheet .edit-footer button {
    flex: 0 0 25%;
    /* feste 25 % Breite */
    background: none;
    border: 1px solid #12881e;
    border-radius: 4px;
    padding: 8px 0;
    font-weight: 600;
    cursor: pointer;
}

/* Optional: Stil der Buttons */
.edit-sheet .edit-footer #eCancel {
    background-color: #12881e;
    color: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: center;
}

/* Hover- und Fokus-Zustand: weißer Hintergrund, schwarzer Text */
.edit-sheet .edit-footer #eCancel:hover,
.edit-sheet .edit-footer #eCancel:focus {
    background-color: #fff;
    color: #000;
    outline: none;
    /* falls du den Outline nicht willst */
}

.edit-sheet .edit-footer #eSave {
    background-color: #12881e;
    color: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-align: center;

}

/* Hover- und Fokus-Zustand: weißer Hintergrund, schwarzer Text */
.edit-sheet .edit-footer #eSave:hover,
.edit-sheet .edit-footer #eSave:focus {
    background-color: #fff;
    color: #000;
    outline: none;
    /* falls du den Outline nicht willst */
}


.share-container {
    display: inline-flex;
    gap: 1rem;
    align-items: center;
    /* Abstand zwischen den Buttons */
}

.share-btn {
    display: inline-flex;
    /* Flex-Container, um Kinder vertikal zu stapeln */
    flex-direction: column;
    /* Icon oben, Label unten */
    align-items: center;
    /* zentriert horizontal */
    text-decoration: none;
    /* keine Links-Optik */
    color: inherit;
}

.icon-circle {
    width: 3rem;
    /* Durchmesser des Kreises */
    height: 3rem;
    border-radius: 50%;
    /* rund */
    background: #f0f0f0;
    /* beliebige Kreis-Hintergrundfarbe */
    display: flex;
    align-items: center;
    /* Icon vertikal zentriert */
    justify-content: center;
    /* Icon horizontal zentriert */
}

.icon-circle img {
    width: 1.5rem;
    /* Icon-Größe */
    height: auto;
}

.share-label {
    margin-top: 0.25rem;
    /* Abstand unter dem Kreis */
    font-size: 0.75rem;
    /* kleine Schrift */
    line-height: 1;
    white-space: nowrap;
    /* ein Wort, kein Umbruch */
    overflow: hidden;
    text-overflow: ellipsis;
    /* “…” bei Überlänge */
    text-align: center;
    /* zentriert */
}

/* Statistik Tabs */
.stats-tabs-container {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 4px 22px #3b973b1c;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid #e5eae5;
}

.tab-nav button {
    flex: 1;
    padding: 10px 5px;
    background: #f1f1f1;
    border: none;
    font-weight: 600;
    color: #255b30;
    cursor: pointer;
}

.tab-nav a {
    flex: 1;
    padding: 10px 5px;
    background: #f1f1f1;
    border: none;
    font-weight: 600;
    color: #255b30;
    text-align: center;
    text-decoration: none;
    display: block;
}

.tab-nav button.active,
.tab-nav a.active {
    background: #3B973B;
    color: #fff;
}

.tab-content {
    display: none;
    padding: 20px 10px;
}

.tab-content.active {
    display: block;
}

/* Swipe cards for Satz-Verteilung */
.swipe-container {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
}

.card {
    flex: 0 0 80%;
    max-width: 80%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-right: 1rem;
    padding: 1rem;
    scroll-snap-align: start;
    text-align: center;
}

.card h2 {
    margin: .5rem 0;
    font-size: 1.25rem;
    color: #333;
}

.card p {
    margin: .25rem 0;
    color: #555;
}

.card canvas {
    display: block;
    margin: 0 auto;
}

.swipe-container::-webkit-scrollbar {
    display: none;
}

/* Animation overlay for special results */
.result-animation-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10000;
    font-size: 24px;
}

.result-animation-overlay .icon {
    font-size: 100px;
    z-index: 2;
}

.result-animation-overlay.win .icon {
    color: gold;
    text-shadow: 0 0 10px gold;
}

.particle {
    position: absolute;
    animation: fall 3s linear forwards;
    opacity: 0.9;
}

.particle.firework {
    animation: burst 3s ease-out forwards;
}

@keyframes fall {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes burst {
    from {
        transform: scale(0);
        opacity: 1;
    }

    to {
        transform: scale(2);
        opacity: 0;
    }
}

#cookie-consent {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 1em;
    z-index: 9999;
    display: none;
}

#cookie-consent button {
    margin: 0.3em;
}

#cookie-consent .cc-settings {
    display: none;
    margin-top: 1em;
}

#cookie-consent .cc-option {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5em;
}