html {
    scroll-padding-top: 100px;
    width: 100%;
    min-width: 320px;
}

body {
    background-color: #DAE0E5;
    min-height: 100vh;
    width: 100%;
    min-width: 320px;
    margin: 0;
    font-family: sans-serif;
}

body > div {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    min-width: 320px;
}

p {
    line-height: 1.8;
}

h1, h2 {
    color: #333;
}

iframe {
    border: 0;
}

ul, li {
    margin: 0;
    padding: 0;
}

.spin {
    width: 1em;
    height: 1em;
    margin-left: auto;
    margin-right: auto;
}

main {
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 0 10px
}

.main-wrapper {
    box-sizing: border-box;
    background-color: #f5f5ff;
    margin: 0 auto;
    padding: 15px 20px;
    box-shadow: 0px 0px 12px rgba(0,0,0,0.4);
    flex: 1;
    display: flex;
    flex-direction: column;
}

@media only screen and (max-width: 1200px) {
    .main-wrapper {
        padding: 10px;
    }
}

.main-wrapper > p, .main-wrapper > h3 {
    margin-left: 18px;
}

.text-center {
    text-align: center;
}

footer {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #363636;
    color: white;
    min-height: 50px;
}

@media only screen and (max-width: 420px) {
    footer {
        font-size: 14px;
    }
}

#oldWebsiteNotice {
    width: 100%;
    background-color: khaki;
    color: black;
    font-size: 0.9em;
}

header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
}

header, header * {
    box-sizing: border-box;
}

#navbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
    height: fit-content;
    padding: 0 5px;
}

#logo {
    margin: 12px;
    height: 60px;
    order: 1;
}

#target-login {
    order: 3;
}

#navbar ul {
    display: flex;
    align-items: center;
    justify-content: right;
    flex-grow: 1;
    gap: 40px;
    order: 2;
    margin-right: 20px;
}

#navbar li {
    display: inline;
}

#bt-sign-in {
    color: white;
    text-align: center;
    padding: 14px;
    text-decoration: none;
    font-size: 17px;
}
#navbar a:not(#user-box a, #logo) , #navbar button:not(#user-box button, #bt-sign-in) {
    color: white;
    text-align: center;
    padding: 22px 0;
    text-decoration: none;
    font-size: 17px;
}

#navbar button:not(#user-box button) {
    margin-left: 6px;
    color: #000;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
    background-color: #90ee90;
    border-radius: 8px;
    border: 0;
}

@media only screen and (max-width: 820px) {
    #target-login {
        order: 2;
    }

    #navbar ul {
        order: 3;
        justify-content: space-evenly;
    }

    #navbar a:not(#user-box a, #logo, .dropdown-content a) {
        padding: 0;
    }
}

@media only screen and (max-width: 530px) {
    #target-login {
        order: 2;
    }

    #navbar ul {
        order: 3;
        margin-right: 0;
        gap: 20px;
    }
}

@media only screen and (max-width: 420px) {
    #navbar a:not(#user-box a, #logo, .dropdown-content a) {
        font-size: 12px;
    }

    #navbar button:not(#user-box button) {
        padding: 10px;
        font-size: 12px;
    }
}

#navbar button:not(#user-box button):hover {
    cursor: pointer;
    background-color: #b0feb0;
}
#navbar a:hover:not(#user-link) { 
    color: #90ee90;    
}
#navbar img {
    max-height: 60px;
}

.dropdown-content {
    display: none;
    position: absolute;
    border-radius: 8px;
    min-width: 160px;
    margin-top: 14px;
    background-color: #222;
    min-width: 160px;
    margin-left: -26px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

@media only screen and (max-width: 720px) {
    .dropdown-content {
        margin-top: 0;
    }
}

.dropdown-content a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}
.dropdown-content a:hover {background-color: #333; border-radius: 8px;}
.dropdown:hover .dropdown-content {display: block;}

#login-box {
    position: absolute;
    display: none;
    flex-direction: column;
    background-color: #eee;
    margin-top: 18px;
    margin-left: -66px;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

@media only screen and (max-width: 1335px) {
    #login-box {
        margin-left: 0;
        right: 0;
    }
}

#login-box input {
    margin: 4px;
    padding: 8px;
    vertical-align: middle;
}
#login-box input[type=submit] {
    background-color: #90ee90;
    border: 1px solid rgba(0,0,0,0.3);
    border-radius: 3px;
    font-size: 18px;
}
#login-box input[type=submit]:hover {
    cursor: pointer;
    background-color: #b0feb0;
}

#user-link {
    display: inline-block;
    vertical-align: middle;
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
#user-link:hover {
    text-decoration: underline;
    cursor: pointer;
}
#user-link img {
    height: 1em;
    vertical-align: middle;
}

@media only screen and (max-width: 885px) {
    #user-link {
        max-width: 98px;
    }
}

@media only screen and (max-width: 820px) {
    #user-link {
        max-width: 180px;
    }
}

@media only screen and (max-width: 410px) {
    #user-link {
        max-width: 80px;
    }
}

#user-box {
    position: absolute;
    display: none;
    flex-direction: column;
    background-color: #eee;
    margin-top: 10px;
    margin-left: -55px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}

@media only screen and (max-width: 1230px) {
    #user-box {
        margin-left: 0;
        right: 0;
    }
}

#user-box a {
    padding: 0;
}
.bt-user {
    background-color: #eee;
    width: 100%;
    color: #333;
    font-size: 16px;
    padding: 20px 50px 20px 50px;
    border: 0.5px solid rgba(0,0,0,0.3);
}
#user-box-logout {
    background-color: #eee;
    width: 100%;
    color: #333;
    font-size: 16px;
    border: 0.5px solid rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 0 0 8px 8px;
}
#user-box button:hover {
    background-color: #fff;
    cursor: pointer;
}
#user-box button:active {
    background-color: #d8d8d8;
}


#snackbar {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    /*border: 1px solid rgba(0,0,0,0.3);*/
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 16px;
    color: #fff;
    text-align: center;
    padding: 16px;
    position: fixed;
    z-index: 10;
    right: 6vw;
    top: 140px;
    font-size: 18px;
  }
  
  #snackbar.show {
    visibility: visible;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
  }
  
  @-webkit-keyframes fadein {
    from {top: 0; opacity: 0;} 
    to {top: 140px; opacity: 1;}
  }
  
  @keyframes fadein {
    from {top: 0; opacity: 0;}
    to {top: 140px; opacity: 1;}
  }
  
  @-webkit-keyframes fadeout {
    from {top: 140px; opacity: 1;} 
    to {top: 0; opacity: 0;}
  }
  
  @keyframes fadeout {
    from {top: 140px; opacity: 1;}
    to {top: 0; opacity: 0;}
  }

.sidepanel, .sidepanel * {
    box-sizing: border-box;
}

.sidepanel {
    width: 200px;
    position: fixed;
    z-index: 6;
    top: 105px;
    left: -200px;
    background-color: #333;
    border-radius: 0 20px 20px 0;
    overflow-x: visible;
    padding: 10px 0;
    transition: 0.5s;
    box-shadow: 4px 8px 16px 0px rgba(0,0,0,0.4);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.toggler:checked + .sidepanel {
    left: 0;
}
.sidepanel-tag {
    top: 40px;
    position: absolute;
    left: 200px;
    width: 40px;
    height: 110px;
    background-color: #fc2f6c;
    border-radius: 0 20px 20px 0;
    z-index: -10;
    display: flex;
    align-items: center;
    box-shadow: 2px 6px 16px 0px rgba(0,0,0,0.3);
}
.toggler {
    position: absolute;
    left: -2000px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}
.sidepanel-tag:hover {
    cursor: pointer;
    background-color: #fd457d;
    box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
}
.sidepanel-tag span {
    font-family: 'Segoe UI';
    writing-mode: vertical-lr;
    margin: auto;
    color: white;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 4px;
    user-select: none;
}
.sidepanel a {
    text-decoration: none;
    font-size: 16px;
    color: #818181;
    flex-shrink: 0;
    width: 110px;
    height: 110px;
}
.sidepanel-card img:hover {
    box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
}
.sidepanel-card {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 6px 0;
    position: relative;
}
.sidepanel img {
    flex-shrink: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}
.sidepanel > span {
    color: white;
    height: 5%;
    
}
.sidepanel-card figcaption {
    position: absolute;
    bottom: 0;
    background-color: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 12px; 
    cursor: default;
}
.sidepanel-card label {
    color: white;
    position: absolute;
    margin-right: -145px;
    cursor: pointer;
    background-image: url("/static/img/icon_pin.svg");
    background-size: 25px;
    height: 25px;
    width: 25px;
}
.sidepanel-card label:hover, .toggler:checked + .sidepanel-card label {
    box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
}

.motd-info {
    position: fixed;
    top: 105px;
    left: 250px;
    width: auto;
    max-width: 600px;
    max-height: calc(99% - 105px);
    overflow-y: auto;
    padding: 0;
    background-color: #333;
    border-radius: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 6px 16px 4px rgba(0,0,0,0.4);
}
.motd-info-card {
    min-height: 100px;
    flex-grow: 0;
    list-style-type: none;
    display: flex;
}
.motd-info-card:first-child {
    border-radius: 20px 20px 0 0;
}
.motd-info-card:last-child {
    border-radius: 0 0 20px 20px;
}
.motd-info-card:nth-child(odd) {
    background-color: #222;
}
.motd-info-card-div1 {
    display: flex;
    width: 15%;
}
.motd-info-card-div1 img {
    margin: auto auto;
    max-height: 100px;
    max-width: 100px;
}
.motd-info-card-div2 {
    font-size: 1.0em;
    padding: 0;
    margin-left: -18px;
    width: 15%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.motd-info-card-div2 .qtd-instant {
    font-size: 1.3em;
    font-family: 'Arial Black';
}
.motd-info-card-div2 .qtd-timer {
    margin-top: 4px;
    font-size: 0.8em;
    font-family: 'Arial';
    white-space: pre-line;
}
.motd-info-card-div3 {
    width: 15%;
    margin: 2px 5px;
}
.motd-info-card-div4 {
    /*width: 55%;*/
    margin: auto;
    padding: 0px;
}
.motd-info-card-div4 span {
    font-size: 0.9em;
    white-space: pre-line;
}
.motd-info-card-div5 {
    width: 4%;
}
.motd-info-card-div5:nth-child(odd) {
    border-right: 1px solid #222;
    border-top: 1px solid rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(0,0,0,0.2);
}
.motd-info-card-div5:nth-child(even) {
    border-right: 1px solid #333;
    border-top: 1px solid rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(0,0,0,0.2);
}
.motd-info-card:first-child .motd-info-card-div5 {
    border-top: 1px solid #333;
    border-radius: 0 20px 0 0;
}
.motd-info-card:last-child .motd-info-card-div5 {
    border-bottom: 1px solid #333;
    border-radius: 0 0 20px 0;
}
#motd1:hover + #motd1-info,
#motd2:hover + #motd2-info,
#motd3:hover + #motd3-info,
#motd4:hover + #motd4-info,
.toggler:checked + #motd1 + #motd1-info,
.toggler:checked + #motd2 + #motd2-info,
.toggler:checked + #motd3 + #motd3-info,
.toggler:checked + #motd4 + #motd4-info {
    display: flex;
    animation: fadeIn 0.4s;
}
#motd1-info, #motd2-info, #motd3-info, #motd4-info {
    display: none;
}
@media only screen and (max-width: 820px) {
    .sidepanel {
        top: 140px;
        width: 175px;
        left: -175px;
    }

    .toggler:checked + .sidepanel {
        left: 0;
    }

    .sidepanel-tag {
        left: 175px;
    }
    .motd-info {
        top: 140px;
        left: 225px;
    }
    .motd-info-card {
        min-height: 75px;
    }
    .motd-info-card-div1 img {
        max-height: 75px;
        max-width: 75px;
    }
}
@media only screen and (max-width: 600px), 
    only screen and (max-device-height : 600px)
{ .sidepanel {
    width: 100%;
    left: -100vw;
    border-radius: initial;
    max-height: calc(100vh - 140px);
}
    .sidepanel-tag {
        left: 100vw;
        width: 25px;
        height: 75px;
        border-radius: 0 15px 15px 0;
    }
    .toggler:checked + .sidepanel .sidepanel-tag {
        right: 0px;
        left: initial;
        width: 25px;
        height: 75px;
        border-radius: 15px 0 0 15px;
        z-index: 7;
    }
    .sidepanel-container {
        overflow-y: auto;
    }
    .sidepanel-tag span {
        font-size: 10px;
        letter-spacing: 2px;
    }
    .sidepanel-card:hover label:before {
        box-shadow: 0px 0px 20px rgba(255, 255, 255, 0.6);
    }
    .sidepanel-card label {
        background: none;
        width: 100%;
        height: 100%;
        margin: 0;
    }
    .sidepanel-card label:before {
        content: "\25BD";
        position: relative;
        left: 75px;
        top: 45px;
        display: inline-block;
        height: 25px;
        width: 25px;
        line-height: 25px;
    }
    .motd-info {
        position: initial;
        top: initial;
        left: initial;
        width: 100%;
        max-width: initial;
        max-height: initial;
        overflow-y: initial;
        padding: 0;
        background-color: #333;
        border-radius: 0;
        color: white;
        box-shadow: initial;
    }

    .motd-info-card {
        min-height: 75px;
    }
    .motd-info-card:first-child, 
    .motd-info-card:last-child, 
    .motd-info-card-div5.motd-info-card-div5.motd-info-card-div5 {
        border-radius: 0;
    }
    .motd-info-card:last-child {
        border-bottom: 1px solid #222;
    }
    .motd-info-card-div1 img {
        max-height: 75px;
        max-width: 75px;
    }
}

@media only screen and (max-width: 420px) {
    .motd-info-card {
        font-size: 0.75em;
        min-height: 65px;
    }
    .motd-info-card-div2{
        width: 30%;
        margin-left: -10px;
    }
    .motd-info-card-div3 {
        display: none;
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}