body {
    background-color: #4f4f4f;
    color: #e0e0e0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    padding: 0 20px 20px 20px;
    overflow-y: scroll;
}
#home {
    color: #3a3a3a;
    background: #e9e9ed;
    float: right;
    padding: 4px 8px;
    margin-top: 0.2em;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.7);
    border-radius: 5px;
}
#home .bi-house {
    width: 2em;
    height: 2em;
}
#filters label {
    margin-right:  8px;
}
#filters button {
    min-width: 40px;
    margin: 3px 8px 5px 0;
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.7);
    background: #e9e9ed;
}
#filters button.active,
#filters button.active:hover,
#filters button.active:focus { 
    background: orange;
}
table { 
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px; 
    background-color: #2a2a2a;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
th, td { 
    padding: 8px 10px;
    text-align: left; 
}
tr {
    border-bottom: 1px solid #3a3a3a;
}
tr.game:nth-of-type(2n+1) > * {
    background-color: #333;
}
tr.game:last-child {
    border-bottom: none;
}
tr.game:last-child td:first-child {
    border-bottom-left-radius: 10px;
}
tr.game:last-child td:last-child {
    border-bottom-right-radius: 10px;
}
#wrapper {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    #filters {
        display: flex;
    }
    #filters div {
        margin-right: 2em;
    }
    #home:hover, #home:focus {
        background: #f9e88b;
    }
    #filters button:hover { 
        background: #f9e88b;
    }
}
@media (max-width: 768px) {
    body {
        padding: 0 10px 20px 10px;
        font-size: 80%;
    }
    .round, .team-one-seed, .team-two-seed, .game-number {
        display: none;
    }
    tr.game:last-child td.time {
        border-bottom-left-radius: 10px;
    }
    #filters label {
        display: inline-block;
        min-width: 80px;
    }
    #home .bi-house {
        width: 1.5em;
        height: 1.5em;
    }
}

.day-header,
.day-header:hover {
    background-color: #16645c;
    color: white;
    font-weight: bold;
    padding: 8px 12px;
}

.time-block-start { 
    border-top: 2px solid #aaa; 
}
.day-header + .time-block-start {
    border-top: none;
}
.total-courts-1 .time-block-start,
.active-courts-1 .time-block-start {
    border-top: none;
}
#games.total-courts-1 #th-court,
#games.total-courts-1 td.court {
    display: none;
}
td.winner {
    /*background-color: #bcf0bc;*/
    border-left: 5px solid green;
}
td.loser {
    /*background-color: #f0bcbc;*/
    border-left: 5px solid red;
}
#th-time, #th-court, #th-round, #th-team-one-seed, #th-team-two-seed,
td.time, td.court, td.round, td.team-one-seed, td.team-two-seed {
    text-align: center;
}
table {
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@media (min-width: 1024px) {
    .tooltip-box {
        display: none;
    }
}

@media (max-width: 1024px) {
    .set-score {
        display: none;
    }
    
    /* Tooltip */
    .result {
      position: relative;
      cursor: pointer;
    }
    
    /* Tooltip-Box */
    .tooltip-box {
      position: absolute;
      bottom: 100%;
      left: 20px;
      transform: translateX(-50%);
      background: #e0e0e0;
      color: #000;
      padding: 5px 8px;
      border-radius: 4px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
      z-index: 10;
    }
    
    /* Pfeil */
    .tooltip-box::after {
      content: '';
      position: absolute;
      top: 100%; /* direkt unterhalb der Box */
      left: 50%;
      transform: translateX(-50%);
      border-width: 5px;
      border-style: solid;
      border-color: #e0e0e0 transparent transparent transparent;
    }
    
    /* Sichtbar bei Hover oder Klick */
    .result:hover .tooltip-box,
    .result.active .tooltip-box {
      opacity: 1;
      pointer-events: auto;
    }
}