/* ====================== CHAT INTERFACE ====================== */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    max-height: 86vh;
}

.chat-header {
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    min-height: 40px;
}

.chat-body {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    height: calc(100vh - 180px);
}

.chat-footer {
    padding: 1rem;
    border-top: 1px solid var(--card-border);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-height: 80px;
    background: var(--card-bg);
    border-radius: 0 0 16px 16px;
}

.message-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: 16px;
    padding: 0.8rem 1.2rem;
    gap: 12px;
    border: 1px solid var(--input-border);
    transition: all 0.3s ease;
}

.message-input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.chat-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.icon-btn:hover {
    background: rgba(106, 17, 203, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.icon-btn:active {
    transform: translateY(0);
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.6rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.send-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
}

.send-btn:hover {
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
}

.send-btn:active {
    transform: translateY(-1px);
}

/* ====================== CHAT HEADER BUTTONS REDESIGN ====================== */
.room-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.room-action-btn {
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.room-action-btn:hover {
    transform: translateY(-2px);
}

.room-action-btn:active {
    transform: translateY(0);
}

#invite-btn {
    background: transparent;
    color: var(--text-primary);
}

#invite-btn:hover {
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

#create-room-btn {
    background: transparent;
    color: var(--text-primary);
}

#create-room-btn:hover {
    box-shadow: 0 3px 10px rgba(0, 198, 255, 0.35);
}

/* ====================== MESSAGE STYLES ====================== */
.message {
    display: flex;
    gap: 0.8rem;
    animation: fadeIn 0.3s ease;
}

.message-self {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    position: relative;
}

.message-content {
    max-width: 75%;
    border-radius: 18px;
    padding: 0.6rem 0.9rem;
    position: relative;
    background: var(--glass-bg);
}

.message-self .message-content {
    background: var(--glass-bg);
}

.message-header {
    gap: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.message-sender {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.message-text {
    line-height: 1.4;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.system-message {
    align-self: center;
    background: var(--input-bg);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 80%;
    text-align: center;
}