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

body {
    position: relative;
    background: rgb(11, 12, 16);
    min-height: 100vh;
    font-family: "Avenir Light", Arial, sans-serif;
    color: white;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(0, 123, 255, 0.15) 0%, rgba(0, 123, 255, 0) 42%),
        linear-gradient(180deg, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Grid layout */
.grid-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 1fr auto 1fr;
    width: 100%;
    height: 100%;
}
.grid-item {
    position: relative;
    display: flex;
    align-items: center;
    border: none;
}
.grid-item:nth-child(2) { position: relative; }
.grid-item:nth-child(5) { justify-content: flex-start; }

/* Splash screen */
#splashScreen {
    position: fixed;
    inset: 0;
    background: rgb(11, 12, 16);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
#splashScreen.hide { opacity: 0; pointer-events: none; }

.splash-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.splash-logo-text {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgb(220, 220, 220);
}
.splash-logo-text span { color: rgb(0, 123, 255); }

/* Kicker */
.style-kicker {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgb(170, 170, 170);
}

.user-login-text {
    display: flex;
    align-items: baseline;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: white;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
}
.user-login-text.show { opacity: 1; }

/* Button container */
#buttonContainer {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 300px;
    margin: 0; padding: 0;
    background: rgb(11, 12, 16);
    position: relative;
    height: 40px;
    justify-content: flex-start;
}

#loginButton {
    width: 150px;
    margin: 0; padding: 0;
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    background-color: rgb(0, 0, 0);
    color: rgb(230, 230, 230);
    border: 1px solid rgb(110, 110, 110);
    cursor: pointer;
    border-radius: 20px;
    font-size: 12px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3px;
    transition: background-color 0.3s, color 0.2s;
}
#loginButton:hover {
    background-color: rgba(40, 40, 40, 0.98);
    color: rgb(245, 245, 245);
}

/* Login form container */
#loginFormDiv {
    opacity: 0;
    transition: opacity 0.1s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#loginFormDiv.show { opacity: 1; }

/* Login hint */
.login-hint {
    margin: 0 0 10px;
    color: rgb(170, 170, 170);
    font-size: 12px;
    text-align: center;
    max-width: 300px;
    user-select: none;
}
.login-hint .interactive-below {
    color: #1976d2;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}
.login-hint .interactive-below.active { color: #0d47a1; }

/* Login form */
#loginForm {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 300px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(.4,0,.2,1);
}
#loginForm.open { max-height: 300px; }
#loginForm input::placeholder { color: rgb(200, 200, 200); font-style: italic; }
#loginForm input {
    font-size: 14px;
    color: rgb(20, 25, 50);
    width: 100%;
    padding: 5px;
    background: white;
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
}
#loginForm input[type="text"]     { margin-bottom: 15px; background-color: rgb(230, 230, 230); }
#loginForm input[type="password"] { margin-bottom: 5px;  background-color: rgb(230, 230, 230); }
#loginForm input:focus { outline: none; box-shadow: none; }

/* Passkey / primary login button */
.passkeyButtonWrapper {
    padding: 0;
    border-radius: 10px;
    width: 300px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, rgb(0,125,255), rgb(140,200,140), rgb(255,200,0));
    margin: 20px 0;
}
.passkeyLoginButton {
    width: 292px; height: 42px;
    border-radius: 8px; border: none;
    background: rgba(0, 0, 0, 0.95);
    color: rgb(245, 245, 245);
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}
.passkeyLoginButton:hover { background: rgba(40, 40, 40, 0.98); }
