/* Chatroom page */
.chatroom-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
}

.chatroom-page h2 {
    font-size: 36px;
    font-weight: 300;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.chatroom-intro {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 16px;
}

/* Chat container */
.chat-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

/* Messages container */
.messages-container {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual message */
.message {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
}

.message-name {
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.message-text {
    font-family: 'VT323', monospace;
    font-size: 18px;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-time {
    font-family: 'VT323', monospace;
    font-size: 14px;
    color: #999;
}

/* Input container */
.input-container {
    display: flex;
    gap: 8px;
    padding: 15px;
    background-color: white;
    border-top: 1px solid #ddd;
}

.input-container input[type="text"] {
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

#displayName {
    width: 150px;
    flex-shrink: 0;
}

#messageInput {
    flex: 1;
}

.input-container button {
    font-family: 'VT323', monospace;
    font-size: 16px;
    padding: 8px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.input-container button:hover {
    background-color: #555;
}

/* Scrollbar styling */
.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chatroom-page {
        padding: 40px 20px;
    }

    .messages-container {
        height: 400px;
    }

    .input-container {
        flex-wrap: wrap;
    }

    #displayName {
        width: 100%;
    }

    #messageInput {
        flex: 1;
        min-width: 200px;
    }
}
