html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-image: url('assets/images/ui/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    padding: 1rem;
    overflow: hidden;
}

#game-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 800px);
    max-height: 70vh;
    z-index: 10;
}

#game-container canvas {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0.5rem;
    touch-action: none;
}

#chatInputContainer {
    position: absolute;
    top: calc(50% + 35vh + 1rem);
    left: 50%;
    transform: translateX(-50%);
    width: min(90vw, 800px);
    z-index: 20;
}

.site-logo {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: auto;
    height: auto;
    max-width: 70%;
    max-height: 15vh;
}

.site-footer {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

@media (max-height: 600px) {
    #chatInputContainer {
        top: auto;
        bottom: 4rem;
    }
}

@media (max-width: 900px), (max-height: 760px), (pointer: coarse) {
    body {
        padding: 0.5rem;
        overflow-y: auto;
        overflow-x: hidden;
    }

    #game-container {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        max-height: none;
        margin: 0.5rem auto 0;
    }

    #chatInputContainer {
        position: fixed;
        left: 0.5rem;
        right: 0.5rem;
        top: auto;
        bottom: 0.5rem;
        transform: none;
        width: auto;
        max-width: none;
    }

    .site-logo {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        display: block;
        margin: 0 auto 0.5rem;
        max-width: 82vw;
        max-height: 56px;
    }

    .site-footer {
        display: none;
    }
}

@media (max-width: 480px), (pointer: coarse) {
    #chatInput {
        font-size: 16px;
    }
}
