/*
 * The Blot shell, verbatim where it matters.
 *
 * `#login-screen`, `.loader-container`, `#loader-progress`, `#loader-logo`
 * and `@keyframes round` are copied from kb-front/src/css/style.css — the
 * same z-order story (loader z-20 above the screen's z-10, black first,
 * artwork fading in via `.ready`, loader fading out via the 0.3s opacity
 * transition), the same spinning PNG, the same logo sizing. What is NOT
 * copied is Blot's login buttons and Telegram plumbing: poker has no auth
 * yet, so the screen goes straight from loaded to lobby.
 */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #0F0B26;
    overflow: hidden;
    font-family: 'SFUIText-Regular', -apple-system, system-ui, sans-serif;
}
html, body, div, canvas, img {
    box-sizing: border-box;
    padding: 0;
}

/* ── Login / loading screen — kb-front style.css, trimmed ── */
#login-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 10;
    overflow: hidden;
    background: #000;
    transition: opacity 0.4s ease-out;
}
#login-screen.gone {
    opacity: 0;
    pointer-events: none;
}
/* Zoomed background matches the native splash end state (1.15x). Split in
   two rules exactly as kb-front does: transparent until `.ready`, so slow
   networks see black + the centre loader, never a half-loaded JPEG. */
#login-screen::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    transform: scale(1.15);
    transform-origin: center center;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}
#login-screen.ready::before {
    background: url('/assets/login.jpg') center / cover no-repeat;
    opacity: 1;
}

/* ── Blot's login-bottom block, verbatim (style.css) — hidden until the
      shell decides auto-vs-manual entry, exactly as loginController does. */
.login-design {
    position: absolute;
    z-index: 1;
    width: 1920px;
    height: 1080px;
    transform-origin: 0 0;
    pointer-events: none;
}
.login-bottom-group {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}
.login-buttons-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 40px;
}
.login-buttons-bg {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(85, 85, 85, 0.5);
    border-radius: 10px;
    pointer-events: none;
    z-index: -1;
}
.login-buttons-row {
    position: relative;
    display: flex;
    z-index: 1;
    justify-content: center;
}
.login-guest {
    margin-top: 24px;
    cursor: pointer;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.login-guest:active { opacity: 0.6; }
.login-guest-text {
    color: #fff;
    font-size: 34px;
    font-family: SFUIText-Regular, -apple-system, sans-serif;
    text-decoration: underline;
}

/* ── Centre loader — kb-front style.css verbatim ── */
.loader-container {
    position: absolute;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    top: 30%;
    left: 30%;
    width: 40%;
    height: 40%;
    pointer-events: none;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.3s ease-out;
}
#loader-progress {
    width: 32%;
    height: auto;
    transform-origin: 50% 50%;
    top: 50%;
    left: 50%;
    animation-name: round;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}
#loader-logo {
    width: 25%;
    height: auto;
}
@keyframes round {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ── React lobby host + game canvas host ── */
.reactWrapper {
    position: fixed;
    inset: 0;
    z-index: 5;
}
.reactWrapper.hidden {
    display: none;
}
#game {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: #0b1220;
}
#game.hidden {
    display: none;
}
