/* In-Game Chat Section */
#chatSection {
    background-color: #f5f5f5; /* Light gray background */
    border: 1px solid #e0e0e0;
}
body.dark #chatSection {
    background-color: #3a3a3a; /* Darker gray background */
    border: 1px solid #546e7a;
}
#chatSection h3 {
    color: #37474f;
}
body.dark #chatSection h3 {
    color: #e0e0e0;
}

.chat-messages {
    height: 180px; /* Slightly taller chat scroll */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.75rem;
}
.chat-messages {
    border-color: #e0e0e0;
    background-color: #fcfcfc;
}
body.dark .chat-messages {
    border-color: #546e7a;
    background-color: #3a3a3a;
}

.chat-message {
    padding: 0.6rem 0.9rem;
    border-radius: 1rem; /* More rounded bubbles */
    max-width: 85%; /* Slightly wider bubbles */
    word-wrap: break-word;
    text-align: left;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Subtle shadow */
}
.chat-message {
    background-color: #e3f2fd; /* Light blue message bubble */
}
.chat-message.self {
    background-color: #bbdefb; /* Lighter blue for self messages */
}
body.dark .chat-message {
    background-color: #4a4a4a; /* Darker message bubble */
}
body.dark .chat-message.self {
    background-color: #5c6bc0; /* Darker blue for self messages */
}

.chat-message .sender {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}
.chat-message .sender {
    color: #3f51b5; /* Blue sender name */
}
body.dark .chat-message .sender {
    color: #9fa8da; /* Lighter blue sender name */
}

.chat-message .text {
    font-size: 0.95rem;
}
.chat-message .text {
    color: #212121;
}
body.dark .chat-message .text {
    color: #f5f5f5;
}

#chatInput {
    background-color: #ffffff;
    color: #212121;
    border-color: #bdbdbd;
}
body.dark #chatInput {
    background-color: #4a4a4a;
    color: #f5f5f5;
    border-color: #546e7a;
}


/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .chat-messages {
        height: 150px;
    }
    .chat-message {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}
