html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #51c8c4;
    background-image: url('/public/background/city-sky.png');
    background-repeat: repeat-x;
    background-position: top center;
    background-size: auto 900px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    line-height: 2em;
}

h1, h2 {
    color: white;
    font-size: 32px;
    text-align: center;
    text-shadow: 0px 0px 30px #fd00cf;
    margin-block-start: 1em;
    margin-block-end: 1em;
}

h2 {
    font-size: 11px;
    line-height: 28px;
}

p {
    color: white;
    font-size: 10px;
    text-shadow: 0px 0px 30px #fd00cf;
}

input {
    font-size: 10px;
    color: white;
    background-color: transparent;
    text-align: center;
    padding: 4px 16px;
    border: 3px solid white;
    margin: 0;
}

button {
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
}

.button {
    font-size: 10px;
    color: white;
    text-align: center;
    text-shadow: 0px 0px 30px #fd00cf;
    padding: 0px 20px;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 46px);
    height: 55px;
    margin-top: 6px;
}

.button:hover {
    cursor: pointer;
    color: #fd00cf;
    background-color: white;
    border: 3px solid #fd00cf;
}

.tile-wrapper {
    position: relative;
    margin: 8px;
}

.tile-wrapper-half {
    position: relative;
    margin: 30px 8px 8px 8px;
}

.tile-wrapper::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 4px solid #ff9f53;
    border-right: 12px solid #ff9f53;
    border-bottom: 12px solid #ff9f53;
    border-radius: 16px 24px 24px 24px;
    pointer-events: none;
}

.tile-wrapper-half::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    right: 10px;
    bottom: -20px;
    border: 4px solid #ff9f53;
    border-right: 12px solid #ff9f53;
    border-bottom: 12px solid #ff9f53;
    border-radius: 16px 24px 24px 24px;
    pointer-events: none;
}

.tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 24px 32px 32px 24px;
    padding: 15px 20px;
    box-sizing: border-box; /* prevent width:100% + padding overflow on mobile */
    border-radius: 12px;
    position: relative;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    font-size: 11px;
}

.scroll {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(121, 121, 121, 0.8) transparent;
}

.tile-logo {
    background: repeating-linear-gradient(128deg, #b33060 0px, #b33060 64px, #7a2855 64px, #7a2855 128px, #5f2149 128px, #5f2149 192px, #4a1a3e 192px, #4a1a3e 256px, #3d1b4f 256px, #3d1b4f 320px);
}

#title-box.tile-wrapper::before {
    border-color: #b33060;
}

.tile-login {
    background: #1e1747;
}

#login-box.tile-wrapper::before, #links-box.tile-wrapper-half::before {
    border-color: #1e1747;
}

.tile-changelog {
    background: white;
}

#news-box.tile-wrapper::before {
    border-color: white;
}

#todo-box.tile-wrapper::before {
    border-color: white;
}

.big {
    width: 350px;
    height: 350px;
}

.half {
    width: 350px;
    height: 175px;
}

.quarter {
    width: calc(175px - 32px);
    height: calc(175px - 32px);
    margin: 16px 28px;
}

.tile.quarter::before {
    border: none;
}

.tile-changelog {
    color: black;
    align-items: flex-start;
    justify-content: flex-start;
}

.tile-changelog h3 {
    margin: 0;
    font-size: 10px;
}

.tile-changelog p, .tile-changelog .mob {
    color: black;
    font-size: 10px;
    text-shadow: none;
    margin-block-start: 0;
    margin-block-end: 1.5em;
    line-height: 2em;
}

.tile-changelog p span, .tile-changelog h3 span {
    font-size: 18px;
}

#signed {
    display: block;
    color: white;
    justify-content: flex-start;
}

#signed h3 {
    width: 100%;
    margin: 0;
    font-size: 10px;
    text-align: center;
    border-bottom: 1px solid white;
    padding-bottom: 10px;
}

#signed .character {
    width: 100%;
    height: 60px;
    font-size: 10px;
    border-bottom: 1px solid white;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    line-height: 20px;
}

#signed img {
    width: 40px;
    margin-right: 8px;
}

#signed button {
    margin-left: auto;
    padding: 10px 24px;
    font-size: 10px;
}

#signed button:hover, #signed label:hover {
    cursor: pointer;
}

#signed .character button {
    width: 80px;
    height: 40px;
}

#signed .character button span {
    font-size: 20px;
    line-height: 10px;
}

#signed label {
    font-size: 10px;
}

.cityscape {
    width: 100%;
    height: 430px;
    position: relative;
    overflow: clip;
}

.cityscape .layer {
    background-repeat: repeat-x;
    background-position: bottom left;
    background-size: auto 100%;
    image-rendering: pixelated;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 480px;
}

.mob {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-block-start: 1em;
    margin-block-end: 1em;
}

.mob img {
    width: 64px;
    margin-right: 8px;
}

.tabs {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid white;
}

.tab-button {
    padding: 8px 16px;
    font-size: 8px;
    background: transparent;
    color: white;
    cursor: pointer;
    margin-right: 8px;
    border: none;
}

.tab-button.active {
    background-color: white;
    color: #1e1747;
}

.tab-content {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.tab-content.active {
    display: flex;
}

.tab-content input {
    width: calc(100% - 38px);
    color: #1e1747;
    background-color: white;
}

.tab-content label {
    color:white;
    font-size: 8px;
}

#terms-and-privacy:hover {
    cursor: pointer;
}

@media (max-width: 768px), (hover: none) and (pointer: coarse) {

    .big {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .half {
        width: 100%;
        aspect-ratio: 2 / 1;
        height: auto;
    }

    .cityscape {
        height: 360px;
    }

}

.total-popup-window {
    background-color: #677c8f;
}

.total-popup-window .content {
    overflow-y: auto;
}

.total-popup-window .window-button {
    font-family: "Press Start 2P", system-ui;
    font-weight: 400;
    font-style: normal;
    line-height: 18px;
}

.total-popup-window .titlebar .title {
    font-size: 14px;
}

.terms-container {
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

.terms-container h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 16px;
    text-align: center;
    text-shadow: none;
}

.terms-container h2 {
    font-size: 18px;
    font-weight: bold;
    margin-top: 24px;
    margin-bottom: 12px;
    text-shadow: none;
}

.terms-container p {
    font-size: 14px;
    margin-bottom: 12px;
    text-shadow: none;
}

.terms-container ul, .terms-container ol {
    padding-left: 20px;
    margin-bottom: 16px;
    text-shadow: none;
}

.terms-container ul li, .terms-container ol li {
    font-size: 14px;
    margin-bottom: 8px;
    text-shadow: none;
}

.new-character {
    font-size: 12px;
    color: white;
    text-shadow: none;
}

.new-character label {
    width: 50px;
    display: inline-block;
    margin: 8px 20px;
}

.new-character input {
    border: 1px solid white;
    font-size: 12px;
    color: white;
    outline: none;
    text-align: left;
    padding: 6px;
}

.new-character select {
    font-size: 12px;
    padding: 6px;
}

.new-character button {
    width: 150px;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    margin: 20px;
}

#footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    margin-top: 80px;
    width: calc(100% - 40px);
    border-top: 3px solid white;
    color: white;
    padding: 20px;
}

#footer .column a, #footer .column a:visited {
    text-decoration: none;
    color: white;
}

#footer .column a:hover {
    color: #677c8f;
}

#footer .column h5 {
    text-shadow: none;
}

#footer .column p {
    text-shadow: none;
    line-height: 2.5em;
}
