* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f6f8fb;
    color: #172033;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(15, 118, 110, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
}

main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

#rating {
    display: none;
    text-align: center;
}

#rating a,
.join-flow small a {
    color: #0751e4;
}

#sessionNameRequired,
#nameRequired,
#passcodeLength {
    display: none;
    color: #b91c1c;
}

.header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: center;
    max-width: 620px;
    margin: 0 auto 18px;
    padding: 22px;
    border: 1px solid #d9e2ec;
    border-left: 7px solid #0f766e;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(23, 32, 51, 0.08);
}

.header p {
    margin: 0 0 4px;
    color: #115e59;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.1;
}

.mark {
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 800;
}

.join-flow {
    width: min(100%, 620px);
    margin: 0 auto;
    padding: 22px;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(23, 32, 51, 0.07);
}

.join-flow input {
    border: 1px solid #cbd5e1;
    color: #172033;
}

.join-flow input,
.join-flow button,
select {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 16px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.button-group button {
    flex: 1;
    margin-bottom: 0;
}

.join-flow button {
    cursor: pointer;
    border: none;
    color: #ffffff;
    transition: background-color 0.2s ease;
}

#startSessionButton {
    background-color: #0f766e;
}

#startSessionButton:hover {
    background-color: #115e59;
}

#joinSessionButton {
    background-color: #2563eb;
}

#joinSessionButton:hover {
    background-color: #1d4ed8;
}

.join-flow small {
    display: block;
    text-align: center;
}

#sessionContainer {
    min-height: 560px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #111827;
}

@media (max-width: 640px) {
    main {
        width: min(100% - 20px, 1120px);
        padding-top: 16px;
    }

    .header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .button-group {
        flex-direction: column;
    }

    #sessionContainer {
        min-height: 70vh;
    }
}
