.chat-header {
    padding: 1rem 1rem 0.5rem 1rem;
    background: transparent;
    border-bottom: none;
    box-shadow: none;
}

.chat-header h3 {
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin: 0;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.chat-row {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: flex-end;
}

.chat-row.self {
    justify-content: flex-end;
}

.chat-row.other {
    justify-content: flex-start;
}

.chat-avatar {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    margin-bottom: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 10px;
}

.chat-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-avatar-emoji {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.message {
    padding: 0.5rem 0.8rem;
    border-radius: 18px;
    color: var(--text-main);
    font-family: 'Exo 2', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
    animation: fadeIn 0.3s ease;
    max-width: 75%;
    width: fit-content;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message-self {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.message-other {
    background: rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message-name {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 0;
    font-weight: bold;
    margin-left: 0;
}

.system-message {
    align-self: center;
    background: transparent;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.2rem;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
}

.system-message.success {
    color: #fbbf24; /* Amber-400 */
    font-weight: bold;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
    font-size: 0.95rem;
    margin: 10px 0;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 8px 16px;
    width: 90%;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.1);
}

/* Chat Separator */
.chat-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.2rem 0 0.4rem 0;
    position: relative;
    color: var(--text-dim);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: bold;
}

.chat-separator::before,
.chat-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.chat-separator span {
    padding: 0 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-form {
    padding: 1rem;
    min-height: auto;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 0;
    align-items: center;
    position: relative;
}

.chat-form input {
    flex: 1;
    width: 100%;
    margin-bottom: 0;
    padding: 0.6rem 50px 0.6rem 1rem;
    height: 38px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 19px;
    color: var(--text-main);
    transition: all 0.2s;
}

.chat-form input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.chat-form button {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    margin: 0;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: all 0.2s;
    position: absolute;
    right: calc(1rem + 3px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.chat-form button:hover {
    transform: translateY(-50%) scale(1.1);
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.chat-form button svg {
    width: 16px;
    height: 16px;
}

/* Enhanced Chat Names */
.message-name {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--primary);
    text-shadow: 0 0 5px rgba(99, 102, 241, 0.3);
}
