/* Mobile-first Ansatz */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(120deg, #e0e7ff 0%, #f8fafc 100%);
    min-height: 100vh;
    height: 100%;
    font-size: 16px;
}
#mainWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
}
#leftPane {
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}
#rightPane {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}
#rightPane h1 {
    font-size: 1.8em;
    color: #3b82f6;
    margin: 0 0 0.5em 0;
    text-align: center;
    font-weight: 700;
}
#rightPane h2 {
    text-align: center;
    margin: 0 0 1em 0;
    font-weight: 600;
    font-size: 1.4em;
}
#loginBox {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.09);
    padding: 2rem 1.5rem;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 350px;
    box-sizing: border-box;
}
#loginBox h2 {
    margin-bottom: 1.2em;
    color: #3b82f6;
    font-weight: 600;
    letter-spacing: 1px;
}
#loginBox input {
    width: 100%;
    padding: 0.8em;
    margin: 0.5em 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    background: #f3f4f6;
    transition: border 0.2s;
    box-sizing: border-box;
}
#loginBox input:focus {
    border: 1.5px solid #3b82f6;
    outline: none;
    background: #fff;
}
#loginBox button {
    width: 100%;
    padding: 0.8em;
    margin-top: 1em;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
#loginBox button:hover {
    background: #2563eb;
}
#loginError {
    color: #ef4444;
    margin-top: 0.8em;
    min-height: 1.2em;
    text-align: center;
}
#dashboard {
    display: none;
}
#dashboard h2 {
    color: #3b82f6;
    margin-bottom: 1em;
}
#dashboard button {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.7em 1.2em;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 1.5em;
    transition: background 0.2s;
}
#dashboard button:hover {
    background: #dc2626;
}
#filterBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5em;
    width: 100%;
}
#filterBox label {
    margin-bottom: 0.5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
select, button {
    margin: 0.5em 0;
    width: 100%;
    max-width: 250px;
}
.ergebnis-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9em;
}
.ergebnis-tabelle th, .ergebnis-tabelle td {
    border: 1px solid #e5e7eb;
    padding: 0.5em;
    text-align: center;
}
.ergebnis-tabelle th {
    background: #e0e7ff;
    font-weight: 600;
}
.ergebnis-tabelle tr:nth-child(even) {
    background: #f8fafc;
}
.ergebnis-tabelle .kopf {
    background: #e0f2fe;
    font-size: 1em;
}
.ergebnis-tabelle .mannschaft {
    background: #f1f5f9;
    font-weight: bold;
}
.ergebnis-tabelle .wechsel {
    color: #16a34a;
    font-style: italic;
    text-align: left;
}
#spiele {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#logoutBtn {
    align-self: center;
    margin-bottom: 1.5em;
}
.tabs {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 10;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1em;
}
.tab-btn {
    background: none;
    border: none;
    padding: 0.8em 1em;
    font-size: 1em;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: border 0.2s;
    width: auto;
    white-space: nowrap;
}
.tab-btn.active {
    border-bottom: 3px solid #3b82f6;
    color: #3b82f6;
    font-weight: bold;
}
.tab-content {
    display: none;
    width: 100%;
}
.tab-content.active {
    display: block;
}

/* Schöne Dropdowns */
select {
    padding: 0.7em 1.5em 0.7em 0.7em;
    border: 1px solid #bfc7d1;
    border-radius: 6px;
    background: #f8fafc url('data:image/svg+xml;utf8,<svg fill="gray" height="16" viewBox="0 0 20 20" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>') no-repeat right 0.7em center/1em;
    font-size: 1em;
    color: #222;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 120px;
    transition: border 0.2s;
    max-width: 100%;
}
select:focus {
    border-color: #3b82f6;
    outline: none;
    background-color: #e0e7ef;
}

/* Schöne Checkboxen */
input[type="checkbox"] {
    accent-color: #3b82f6;
    width: 1.1em;
    height: 1.1em;
    vertical-align: middle;
    margin-right: 0.4em;
    border-radius: 4px;
    border: 1.5px solid #bfc7d1;
    transition: accent-color 0.2s;
}
label {
    font-size: 1em;
    color: #222;
    margin-right: 1em;
    cursor: pointer;
}

/* Responsive Tabellen */
.table-container {
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px) {
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table, .ergebnis-tabelle, .details-tabelle {
    display: table;
    white-space: nowrap;
    width: auto; /* <-- Das ist wichtig! */
  }
}

/* Desktop-Anpassungen */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
    #mainWrapper {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        padding: 2rem;
    }
    #leftPane {
        margin-bottom: 0;
        margin-right: 2rem;
    }
    #rightPane {
        padding: 2em;
    }
    #filterBox {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    #filterBox label {
        flex-direction: row;
        align-items: center;
        width: auto;
        margin-right: 1em;
    }
    select, button {
        width: auto;
    }
    .ergebnis-tabelle {
        font-size: 1em;
    }
    .tab-btn {
        padding: 1em 2em;
        font-size: 1.1em;
    }
}

