:root {
    --nim-ink: #082f49;
    --nim-panel: #ffffff;
    --nim-line: #67e8f9;
    --nim-blue: #0ea5e9;
    --nim-blue-dark: #0369a1;
    --nim-accent: #67e8f9;
    --nim-red: #dc2626;
    --nim-text: #164e63;
}

html,
body {
    min-height: 100%;
}

body {
    color: var(--nim-text);
    background:
        linear-gradient(90deg, rgba(14, 165, 233, 0.11) 1px, transparent 1px),
        linear-gradient(0deg, rgba(14, 165, 233, 0.11) 1px, transparent 1px),
        #ffffff;
    background-size: 48px 48px;
}

.nim-home {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

.nim-entry {
    width: min(720px, 100%);
    border: 1px solid var(--nim-line);
    border-radius: 8px;
    background: var(--nim-panel);
    box-shadow: 0 24px 80px rgba(13, 32, 54, 0.16);
    padding: 40px;
    position: relative;
}

.nim-entry::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 8px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(90deg, var(--nim-blue-dark), var(--nim-blue), var(--nim-accent));
}

.nim-logo {
    width: 180px;
    height: auto;
    display: block;
    margin-bottom: 36px;
}

h1 {
    margin: 0 0 32px;
    color: var(--nim-ink);
    font-family: "Aptos Display", "Segoe UI", sans-serif;
    font-size: 42px;
    line-height: 1;
    letter-spacing: 0;
}

.nim-room-form label {
    display: block;
    margin-bottom: 10px;
    color: #35586b;
    font-weight: 700;
}

.nim-room-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
}

.nim-room-row .form-control {
    min-height: 54px;
    border: 1px solid #67e8f9;
    border-radius: 6px;
    color: var(--nim-ink);
    font-size: 20px;
    background: #ffffff;
}

.nim-room-row .form-control:focus {
    border-color: var(--nim-blue);
    box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.35);
    outline: none;
}

.nim-join {
    min-width: 132px;
    min-height: 54px;
    border-radius: 6px;
    background: var(--nim-blue);
    color: #ffffff;
    border-color: var(--nim-blue);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nim-join:hover,
.nim-join:focus {
    background: var(--nim-blue-dark);
    border-color: var(--nim-blue-dark);
}

#errormessage {
    min-height: 24px;
    margin: 18px 0 0;
    color: #9b1117;
    font-weight: 800;
}

@media (max-width: 640px) {
    .nim-home {
        padding: 16px;
        place-items: stretch;
        align-content: center;
    }

    .nim-entry {
        padding: 28px 20px;
    }

    .nim-logo {
        width: 150px;
        margin-bottom: 28px;
    }

    h1 {
        font-size: 34px;
    }

    .nim-room-row {
        grid-template-columns: 1fr;
    }

    .nim-join {
        width: 100%;
    }
}
