body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}
.container {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
}
h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.form-group {
    margin-bottom: 1rem;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dddfe2;
    border-radius: 6px;
    box-sizing: border-box;
}
button {
    width: 100%;
    background-color: #1877f2;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}
button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}
#chat-view {
    display: none;
}
#user-list-container {
    margin-top: 1rem;
}
#user-list {
    list-style-type: none;
    padding: 0;
}
#user-list li {
    background-color: #e7f3ff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
#status {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    color: #606770;
}
.error-msg {
    color: #fa383e;
    text-align: center;
    margin-top: 1rem;
    font-weight: bold;
}

/* --- Chat UI --- */
#chat-container {
    margin-top: 1.5rem;
    border: 1px solid #dddfe2;
    border-radius: 8px;
    overflow: hidden;
}
#chat-messages {
    height: 200px;
    overflow-y: auto;
    padding: 0.75rem;
    background-color: #f0f2f5;
}
.chat-message {
    margin-bottom: 0.4rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.9rem;
}
.chat-author {
    font-weight: 600;
    color: #1877f2;
}
.chat-text {
    color: #1c1e21;
}
#chat-input-area {
    display: flex;
    border-top: 1px solid #dddfe2;
}
#chat-input {
    flex: 1;
    border: none;
    padding: 0.75rem;
    border-radius: 0;
    margin-bottom: 0;
}
#chat-send-btn {
    width: auto;
    margin-top: 0;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
}

/* --- Leave Button --- */
.leave-btn {
    background-color: #fa383e;
}
.leave-btn:hover {
    background-color: #d9343a;
}

/* --- Notification Button --- */
#enable-notifications-btn {
    background-color: #34a853;
}
#enable-notifications-btn:hover {
    background-color: #2d9249;
}

/* --- Room URL Display --- */
#room-url-display {
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: #e8f5e9;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.9rem;
}
.room-url-text {
    flex: 1;
    word-break: break-all;
}
.room-url-text a {
    color: #1877f2;
    text-decoration: none;
}
.room-url-text a:hover {
    text-decoration: underline;
}
.copy-btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background-color: #34a853;
    flex-shrink: 0;
}
.copy-btn:hover {
    background-color: #2d9249;
}
