body {
    background-color: #f1f1f1;
    color: #1b1d1e;
}
body.dark {
    background-color: #121111;
    color: #fff;
}
.icon {
    max-width: 48px;
    max-height: 48px;
}

#header {
    font-weight: bold;
    font-size: 25px;
    text-align: center;
    margin: 10px 0 0 0;
}

#event, .data_period {
    font-size: 15px;
    text-align: center;
    margin: 10px;
}

#event_name {
    font-weight: bold;
}

.table > thead > tr > th {
    vertical-align: middle;
}

.table > tbody > tr > td {
    vertical-align: middle;
}

#footer {
    font-size: 13px;
    text-align: center;
    margin: 10px;
}
.order-inactive span {
    visibility:hidden;
}
.order-inactive:hover span {
    visibility:visible;
}
.order-active span {
    visibility: visible;
}
.right {
    float: right;
}
#searchpokemon {
    width: 200px;
    max-width: 100%;
    color: black;
    font-size: 12pt;
    outline: 0;
    vertical-align: -50%;
    height: 44px;
    border: 1px solid #333;
    margin: 0 0 10px 10px;
}
.headandstats {
     width: calc(100% - 210px);
     float: left;
 }
#header-search::-webkit-input-placeholder {
    color: black;
}
#search-field svg {
    fill: red;
    width: 30px;
    position: absolute;
    top: 8px;
    right: 0;
}
#search-field {
    display: inline-block;
    position: relative
}
table {
    border: 1px solid #ccc;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    width: 100%;
    table-layout: fixed;
}
table.dark tr:nth-child(even){
    background-color:grey;
}
table.dark > thead > tr > th {
    color: #fff;
    background-color: #343a40;
    border-color: #454d55;
}
table.dark.table-hover tbody tr:hover {
    color: lightgrey;
}
table caption {
    font-size: 1.5em;
    margin: .5em 0 .75em;
}
table tr {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: .35em;
}
table th,
table td {
    padding: .625em;
    text-align: center;
}

table.total td {
    padding-top: .1em;
    padding-bottom: .1em;
}
table th {
    font-size: .85em;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.desktop-hide {
    display: none;
}
.sumstats {
    position: absolute;
    top: 55px;         /* weiter runter, z.B. 55px (passe je nach Switch/Uhrzeit an) */
    right: 36px;       /* evtl. noch etwas weiter nach innen: 46px, 56px... */
    width: 350px;      /* mehr Breite, z.B. 260px */
    z-index: 100;
    background: rgba(255,255,255,0.97);
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    overflow: hidden;
box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border-radius: 20px;
    background: #fafafa;
    margin-bottom: 0; /* WICHTIG: Kein zusätzliches Margin am unteren Rand */
}

body.dark .sumstats {
    box-shadow: 0 4px 24px rgba(0,0,0,0.30);
    background: #222;
    margin-bottom: 0;
}
@media screen and (max-width: 900px) {
    .sumstats {
        position: static;
        width: 100%;
        margin: 0 auto 16px auto;
        top: unset;
        right: unset;
        left: unset;
        border-radius: 0;
        box-shadow: none;
    }
}

@media screen and (max-width: 600px) {
    table {
        border: 0;
    }
    table caption {
        font-size: 1.3em;
    }
    table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    table tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: .625em;
    }
    table td {
        border-bottom: 1px solid #ddd;
        display: block;
        font-size: .8em;
        text-align: right;
    }
    table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
    }
    table td:last-child {
        border-bottom: 0;
    }
    .mobile-hide {
        display: none;
    }
    .desktop-hide {
        display: inline-block;
    }
    .headandstats,.sumstats {
        max-width: 48%;
    }
    #searchpokemon {
        width: calc(100% - 1px);
    }
}
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    border: 2px solid #fff;
    border-radius: 25px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 4px;
    top: 2px;
    background-color: #fff;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #000;
}

input:focus + .slider {
    box-shadow: 0 0 1px #000;
}

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

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}
/* Darkmode Text-Fix */
body.dark,
body.dark td,
body.dark th,
body.dark .data_period,
body.dark .btn-back,
body.dark table,
body.dark table tr,
body.dark table td,
body.dark table th,
body.dark .table-hover tbody tr:hover td {
    color: #fff !important;
}
body.dark table.total {
    background-color: #222 !important;
}
body.dark table.total td {
    color: #fff !important;
}
.sumstats table {
    margin-bottom: 0; /* Verhindert, dass <table> zusätzlichen Platz nach unten hat */
}