body {
    font-family: "Arial";
    width: 100%;
    height: 100%;
    margin: 0;
}
#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
#mainpart {
  flex: 1;
}
button {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: black;
    border: 3px solid black;
    height: 45px;
    cursor: pointer;
    transition: background-color 0.3s ease, filter 0.3s ease;
    background-color: white;
}
button:hover {
    filter: brightness(0.9);
}

/* Loading div */
#loadingdiv {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #555555;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Hlavička */
header {
    height: 75px;
    background-color: #EFEFEF;
    padding: 15px;
    margin: 0 0 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid darkgray;
}
#header2 {
    display: none;
    text-align: center;
}
header a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: black;
    font-size: 30px;
    flex: 1;
    width: 228px;
}
header h2 {
    margin: 0 0 0 7.5px;
    font-size: 30px;
}
header h1 {
    font-size: 30px;
    flex: none;
}
header div {
    flex: 1;
    text-align: right;
}
.timer {
    color: #1c4148;
    margin-left: 3px;
}
#livetext {
    padding: 7.5px;
    font-size: 30px;
    font-weight: bold;
    background-color: red;
    color: white;
    border: 4px solid white;
    cursor: default;
}
#sleeptext {
    padding: 7.5px;
    font-size: 30px;
    font-weight: bold;
    background-color: #454545;
    color: white;
    border: 4px solid white;
    cursor: default;
}
#livedot {
    font-size: 30px;
    font-weight: bold;
    color: white;
    display: inline-block;
    animation: pulse 1.5s infinite;
}
#logo {
    width: 60px;
}
@keyframes pulse {
    0% {
      opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
@media only screen and (max-width: 1200px) {
    #header {
        height: 50px;
        margin-bottom: 0;
    }
    header a {
        width: 151px;
    }
    #header h1 {
        display: none;
    }
    #header2 {
        display: block;
        height: auto;
        padding: 15px 5px;
        background-color: #d0d0d0;
    }
    #header2 h1 {
        font-size: 18px;
        margin: 0px;
    }
    header h2 {
        font-size: 20px;
        margin: 0 0 0 5px;
    }
    #livetext {
        font-size: 20px;
    }
    #livedot {
        font-size: 20px;
    }
    #logo {
        width: 40px;
    }
}

/* Stream */
#stream {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}
#stream iframe {
    border: 4px solid darkgrey;
    width: 672px;
    height: 378px;
}
@media only screen and (max-width: 739px) {
    #stream iframe {
        width: 80vw;
        height: 45vw;
    }
}

/* Dík */
#thanks {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}
#thanks h1 {
    padding: 2.5px 10px 2.5px 10px;
    margin-bottom: 40px;
    text-decoration: underline;
    background-color: #fff2cc;
    text-align: center;
}
#thanks img {
    width: 50%;
}
@media only screen and (max-width: 1200px) {
    #thanks h1 {
        font-size: 20px;
    }
    #thanks img {
        width: 80%;
    }
}

/* Kalendář */
#schedule {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    margin: 0 25px 0 25px;
}
@media only screen and (max-width: 1200px) {
    #schedule {
        margin: 0 25px 50px 25px;
    }
}
#nothing {
    width: 300px;
    display: none;
}
.tournamentbox {
    display: inline-block;
    text-align: center;
    width: 400px;
    border: 4px solid black;
}
.volejbalbox {
    background: linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)),
    url('src/logo-volejbal.png');
    background-size: 300px;
    background-position: center center;
    background-repeat: no-repeat;
}
.basketbalbox {
    background: linear-gradient(rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.97)),
    url('src/logo-basketbal.png');
    background-size: 300px;
    background-position: center center;
    background-repeat: no-repeat;
}
.florbalbox {
    background: linear-gradient(rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.97)),
    url('src/logo-florbal.png');
    background-size: 300px;
    background-position: center center;
    background-repeat: no-repeat;
}
.fotbalbox {
    background: linear-gradient(rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.97)),
    url('src/logo-fotbal.png');
    background-size: 300px;
    background-position: center center;
    background-repeat: no-repeat;
}

.tbtitle {
    font-size: 18px;
    font-weight: bold;
    border-bottom: 4px solid black;
    padding: 20px 0;
    margin-bottom: 20px;
    background-color: #efefef;
}
.women{
    background-color: pink;
    padding: 2px;
}
.men {
    background-color: #aaaaff;
    padding: 2px;
}
#firsttb .tbtitle {
    background-color: #d0e0e3;
    color: #1c4148;
}
.datebox {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 15px;
    font-size: 25px;
}
.tbdate {
    font-weight: bold;
    background-color: yellow;
}
.rulesbox a {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
}
.rulesbox a:hover {
    color: #555555;
}
.rulesbox img {
    width: 12px;
}
.infobox {
    margin: 20px 15px 10px 15px;
    font-size: 12px;
    color: #555555;
}
.infobox p {
    margin: 0 0 5px 0;
}


/* Tabulka */
div.results {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

span.tablename {
    margin-left: 37.5px;
    font-size: 22.5px;
    font-weight: bold;
}
table.maintable {
    text-align: center;
    border-collapse: collapse;
    border: 3px solid black;
    margin: 7.5px 37.5px;
    font-size: 22.5px;
}
table.maintable td {
    width: 90px;
    height: 45px;
    border-right: 1.5px solid black;
    border-bottom: 1.5px solid black;
}
table.maintable td.teamsup {
    background-color: #EFEFEF;
    font-size: 26px;
    border-bottom: 3px solid black;
}
table.maintable td.teamsa {
    background-color: #FFF2CC;
    font-size: 26px;
    border-right: 3px solid black;
}
table.maintable td.teamsb {
    background-color: #fce5cd;
    font-size: 26px;
    border-right: 3px solid black;
}
table.maintable td.teamss {
    background-color: #ead1dc;
    font-size: 26px;
    border-right: 3px solid black;
}
table.maintable td.hlavni {
    font-size: 15px;
    text-align: left;
    vertical-align: bottom;
    box-sizing: border-box;
    padding: 6px;
    border-bottom: 3px solid black;
    border-right: 3px solid black;
}
table.maintable td.dbor {
    border-right: 3px double black;
}
table.maintable td.label {
    font-size: 20px;
    font-weight: bold;
    vertical-align: bottom;
    box-sizing: border-box;
    padding-bottom: 7.5px;
    border-bottom: 3px solid black;
}
span.tableinfo {
    font-size: 15px;
    margin-left: 45px;
}
@media only screen and (max-width: 730px) {
    span.tablename {
        font-size: 4vw;
        margin-left: 25px;
    }
    table.maintable {
        font-size: 2.5vw;
        margin: 5px 25px 0px 25px;
        border: 0.5vw solid black;
    }
    table.maintable td {
        height: 5vw;
        border-right: 0.2vw solid black;
        border-bottom: 0.2vw solid black;
    }
    table.maintable td.teamsup {
        font-size: 3vw;
        border-bottom: 0.5vw solid black;
    }
    table.maintable td.teamsa {
        font-size: 3vw;
        border-right: 0.5vw solid black;
    }
    table.maintable td.teamss {
        font-size: 3vw;
        border-right: 0.5vw solid black;
    }
    table.maintable td.teamsb {
        font-size: 3vw;
        border-right: 0.5vw solid black;
    }
    table.maintable td.hlavni {
        font-size: 1.75vw;
        padding: 0.5vw;
        border-bottom: 0.5vw solid black;
        border-right: 0.5vw solid black;
    }
    table.maintable td.label {
        font-size: 2.75vw;
        padding-bottom: 0.5vw;
        border-bottom: 0.5vw solid black;
    }
    span.tableinfo {
        font-size: 2.5vw;
        margin-left: 30px;
    }
}

/* Zápasy */
.sectionheader {
    position: relative;
    height: 75px;
    background-color: #efefef;
    margin: 50px 0px 35px 0px;
    break-before: page;
}
.sectionheader span {
    font-size: 30px;
    font-weight: bold;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.sectionheader button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}
.sectionheader button img {
    width: 30px;
    padding-top: 3.5px;
}

#games {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    margin: 35px 25px 50px 25px;
}
#pgames {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    margin: 35px 25px 50px 25px;
}
div.game {
    text-align: center;
    display: inline-block;
    border: 3.5px solid black;
    width: 275px;
    break-inside: avoid;
}
div.gametitle {
    position: relative;
    height: 40px;
    font-size: 23px;
    font-weight: bold;
    border-bottom: 3px solid black;
}
div.pgametitle {
    position: relative;
    height: 40px;
    font-size: 23px;
    font-weight: bold;
    border-bottom: 3px solid black;
}
div.groupa {
    background-color: #FFF2CC;
    color: #6f5200;
}
div.groupb {
    background-color: #fce5cd;
    color: #6d3800;
}
div.groups {
    background-color: #ead1dc;
    color: #62002b;
}
div.groupt {
    background-color: #e3bd95;
    color: #673d10;
}
div.groupf {
    background-color: #ffde89;
    color: #8b6b1b;
}
span.groupname {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
span.pgroupname {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
span.gamenumber {
    color: #555555;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}
div.result {
    margin: 15px 20px;
    display: flex;
    justify-content: center;
    font-size: 0;
}
div.result span {
    font-size: 30px;
}
div.result span.team {
    font-weight: bold;
    flex: 1;
}
div.result span.score {
    margin: 0 1px;
    flex: none;
}
div.scorers {
    font-size: 15px;
    display: none;
    text-align: left;
    margin: 7.5px 15px;
    color: black;
}
div.pscorers {
    font-size: 15px;
    display: none;
    text-align: left;
    margin: 7.5px 15px;
    color: black;
}
span.goalcount {
    color: #1c4148;
    font-weight: bold;
}
.scorers.show {
    display: block;
}
.pscorers.show {
    display: block;
}

/* Statistiky */
#statstable {
    text-align: center;
    border-collapse: collapse;
    border: 3px solid black;
    margin: 35px auto 50px auto;
    font-size: 22.5px;
}
#statstable th {
    background-color: #cccccc;
    border-bottom: 3px solid black;
    border-right: 1.5px solid black;
    min-width: 40px;
}
#statstable td {
    height: 32.5px;
    border-bottom: 1.5px solid black;
}
.stposition {
    background-color: #efefef;
    width: 40px;
    border-right: 1.5px solid black;
}
.stteam {
    width: 40px;
    color: #666666;
    font-size: 18px;
    border-right: 1.5px solid darkgrey;
}
.stleft {
    text-align: left;
    padding: 0 7.5px;
    width: 175px;
}
.stname {
    padding: 0 7.5px;
    text-align: left;
    border-right: 1.5px solid black;
}
.width60 {
    width: 60px;
}
.stgoals {
    text-align: right;
    padding-right: 5px;
    background-color: #d0e0e3;
    color: #1c4148;
}

footer {
    position: relative;
    background-color: #5c5c5c;
    padding: 15px;
    text-align: center;
}
footer button {
    margin: 0 auto 15px auto;
    z-index: 1;
}
footer button img {
    width: 10px;
    margin-right: 7.5px;
}
footer span {
    font-size: 15px;
    color: white;
}
footer a {
    font-size: 15px;
    text-decoration: none;
    color: white;
    transition: color 0.3s ease;
    cursor: pointer;
}
footer a:hover {
    color: #000000;
}
footer img.gplogo {
    height: 40px;
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translate(0, -50%);
}
@media only screen and (max-width: 420px) {
    footer img.gplogo {
        top: auto;
        bottom: 1vw;
        right: 3vw;
        height: 20px;
    }
}

/* Tisk */
#printlogo-div {
    margin-top: 100px;
    display: none;
    justify-content: center;
}
#printlogo {
    width: 85px;
}
@media print {
    #header {
        display: none;
    }
    #header2 {
        display: block;
        border-top: 4px solid darkgray;
    }
    .sectionheader {
        margin-top: 0;
    }
    .sectionheader button {
        display: none;
    }
    footer {
        display: none;
    }
    #printlogo-div {
        display: flex;
    }
}