/* ---- Login Screen ---- */

/* Outer wrapper — centers everything vertically and horizontally */
#loginContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Banner area: 800x350, clips sliding backdrops */
#loginBannerArea {
    position: relative;
    width: 800px;
    height: 350px;
    overflow: hidden;
}

/* Both backdrop images — current sits at left:0, next starts off-screen right */
#backdropImg,
#backdropImgNext {
    position: absolute;
    top: 0;
    width: 800px;
    height: 350px;
    display: block;
    transition: left 0.7s ease-in-out;
}

#backdropImg    { left: 0; }
#backdropImgNext { left: 800px; }

/* 30% black overlay between backdrop and banner */
#loginBannerOverlay {
    position: absolute;
    top: 0; left: 0;
    width: 800px;
    height: 350px;
    background: rgba(0, 0, 0, 0.673);
    pointer-events: none;
}

/* Banner PNG sits on top of the backdrop, same size */
#bannerImg {
    position: absolute;
    top: 0; left: 0;
    width: 800px;
    height: 350px;
    display: block;
    pointer-events: none;
}

/* Dark translucent form panel */
#loginPanel {
    width: 800px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0 0 8px 8px;
    padding: 24px 40px;
    text-align: center;
    color: #e0e0e0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
}

.loginUI input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: #fff;
    padding: 6px 10px;
    max-width: 160px;
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    margin: 4px 0 12px 0;
    box-sizing: border-box;
}

#loginButton button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 2px;
    padding: 8px 30px;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s;
}
#loginButton button:hover {
    background: rgba(255, 255, 255, 0.28);
}

.gameserverWait {
    background-color: rgba(255, 216, 44, 0.85);
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    color: #111;
}

.gameserverFail {
    background-color: rgba(255, 74, 74, 0.85);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    color: #fff;
}

.gameserverSuccess {
    background-color: rgba(110, 255, 74, 0.85);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    color: #111;
    display: inline-flex;
    align-items: center;
}

#serverConnectStatus {
    font-family: 'Bebas Neue', sans-serif;
    margin-top: 12px;
    text-align: center;
}

body {
    background-image: url('./websiteassets/tilewp.png');
    background-repeat: repeat;
    background-size: auto;
    background-position: top left;
}


#inGameRoot {
    background-color: rgb(16, 1, 1);
    color: brown;
    font-size: xx-large;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}


/* HTML: <div class="tinyloader"></div> */
.tinyloader {
    width: 10px;
    aspect-ratio: 1;
    outline: 2px solid #fff;
    background:
        radial-gradient(farthest-side, #33ff00 90%, #ff000000) 0 0/2px 2px no-repeat,
        conic-gradient(from 90deg at 2.5px 2.5px, #ff000000 90deg, #fff 0),
        conic-gradient(from -90deg at 7.5px 7.5px, #ffae0000 90deg, #fff 0);
    animation: l1 1.5s infinite;
    margin-left: 6px;
}

@keyframes l1 {
    0% {
        background-position: 0 0
    }

    25% {
        background-position: 100% 0
    }

    50% {
        background-position: 100% 100%
    }

    75% {
        background-position: 0 100%
    }

    100% {
        background-position: 0 0
    }
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: black;
    overflow: hidden;
}

#inGameRoot {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: black;
    overflow: hidden;
}

#canvasContainer {
    width: 1920px;
    height: 1080px;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    background-color: black;
    /* to clearly show letterboxing */
}

#gameCanvas {
    width: 100%;
    height: 100%;
    background-color: rgb(180, 180, 156);
    display: block;
}

.gameoverlayimg {
    position: absolute;
    margin-left: -2px;
    touch-action: none;
    pointer-events: none;
}

/* Chat input styling - positioning is handled dynamically in startup.js resize() */
#chatInput {
    position: absolute;
    background-color: #b8a895;
    border: 2px solid #4a4a4a;
    border-radius: 4px;
    color: #1a1a1a;
    font-family: 'Press Start 2P', monospace;
    outline: none;
    z-index: 10000;
    pointer-events: auto;
}

#chatInput::placeholder {
    color: #4a4a4a;
    opacity: 0.7;
}

#chatInput:focus {
    border-color: #8b7a68;
    background-color: #c4b5a3;
}