/* chat.css - Стили для страницы чата поддержки BHStore */

/* Основная страница чата */
.chat-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--gray-500) 0%, #0a0a0f 100%);
    padding: calc(var(--header-height) + 30px) 0 40px;
    position: relative;
    overflow: hidden;
}

.chat-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../image/pattern.png') repeat;
    opacity: 0.03;
    pointer-events: none;
    animation: slideBackground 30s linear infinite;
}

/* Контейнер чата */
.chat-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.6s ease-out;
}

/* Заголовок чата */
.chat-header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideInDown 0.5s ease-out;
}

.chat-header h1 {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.chat-header h1 i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.3));
}

.chat-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    padding: 0 20px;
}

/* Статус чата */
.chat-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 10px 20px;
    background: rgba(42, 43, 54, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.status-indicator:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ED4245;
    position: relative;
}

.status-dot.online {
    background: var(--accent);
    animation: pulse 2s infinite;
}

.status-dot.online::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: rgba(87, 242, 135, 0.3);
    border-radius: 50%;
    animation: ping 2s infinite;
}

@keyframes ping {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Основная сетка чата */
.chat-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    height: 70vh;
    min-height: 600px;
    max-height: 800px;
}

@media (max-width: 992px) {
    .chat-main {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: auto;
        min-height: auto;
        gap: 20px;
    }
}

/* Окно чата */
.chat-window {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    position: relative;
    backdrop-filter: blur(10px);
    animation: slideInLeft 0.5s ease-out;
}

.chat-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Контейнер сообщений */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

/* Стилизация скроллбара */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: all var(--transition-base);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    transform: scale(1.1);
}

/* Разделитель по дате */
.message-date {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.message-date span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 8px 24px;
    border-radius: 30px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
}

.message-date::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    z-index: 1;
}

/* Сообщение */
.message {
    max-width: 70%;
    animation: messageAppear 0.3s ease-out;
    position: relative;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.user {
    align-self: flex-start;
}

.message.support {
    align-self: flex-end;
}

/* Контент сообщения */
.message-content {
    padding: 16px 20px;
    border-radius: 20px;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.message.user .message-content {
    background: linear-gradient(135deg, rgba(42, 43, 54, 0.95), rgba(30, 31, 41, 0.98));
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-light);
    border-bottom-left-radius: 5px;
}

.message.user .message-content::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 16px;
    height: 16px;
    background: inherit;
    border-right: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    transform: skew(0deg, 0deg);
    border-bottom-right-radius: 50%;
}

.message.support .message-content {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-bottom-right-radius: 5px;
}

.message.support .message-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 16px;
    height: 16px;
    background: inherit;
    border-left: 2px solid var(--primary-dark);
    border-bottom: 2px solid var(--primary-dark);
    transform: skew(0deg, 0deg);
    border-bottom-left-radius: 50%;
}

.message-text {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.message.support .message-text {
    color: white;
}

.message-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 8px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.message.support .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.message-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    margin-top: 5px;
    color: var(--text-tertiary);
}

.message-status i {
    font-size: 0.65rem;
}

.message-status i.fa-check-double {
    color: var(--accent);
}

/* Индикатор печатания */
.typing-indicator {
    align-self: flex-start;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(42, 43, 54, 0.95), rgba(30, 31, 41, 0.98));
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border-bottom-left-radius: 5px;
    width: 80px;
    display: none;
    margin: 10px 25px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.3s ease-out;
}

.typing-indicator.active {
    display: block;
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0.6);
        opacity: 0.6;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Поле ввода */
.chat-input {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: linear-gradient(135deg, rgba(42, 43, 54, 0.95), rgba(30, 31, 41, 0.98));
    backdrop-filter: blur(5px);
}

.chat-input-wrapper {
    position: relative;
}

.chat-input-textarea {
    width: 100%;
    min-height: 60px;
    max-height: 150px;
    padding: 15px 100px 15px 20px;
    background: var(--gray-50);
    border: 2px solid transparent;
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 1rem;
    resize: none;
    line-height: 1.6;
    font-family: inherit;
    transition: all var(--transition-base);
}

.chat-input-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: var(--gray-100);
}

.chat-input-textarea::placeholder {
    color: var(--text-tertiary);
}

.chat-input-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-50);
}

/* Действия в поле ввода */
.chat-input-actions {
    position: absolute;
    right: 15px;
    bottom: 15px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    background: var(--gray-50);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.chat-send-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.chat-send-btn:hover:not(:disabled)::before {
    left: 100%;
}

.chat-send-btn:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

.chat-send-btn i {
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

/* Боковая панель */
.chat-sidebar {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.5s ease-out;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Информация о пользователе */
.user-info {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.user-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
}

.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transition: all var(--transition-base);
    animation: pulse 3s infinite;
}

.user-avatar:hover {
    transform: scale(1.05);
    border-color: var(--secondary);
}

.verified-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    border: 3px solid var(--bg-card);
    box-shadow: var(--shadow-md);
}

.user-name {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.user-id {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    background: var(--gray-50);
    padding: 6px 15px;
    border-radius: 30px;
    display: inline-block;
    border: 1px solid var(--border-light);
}

/* Статистика пользователя */
.user-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 5px;
}

.stat-item {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(124, 58, 237, 0.1));
    padding: 18px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all var(--transition-base);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Информация о чате */
.chat-info {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-light);
}

.info-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.info-title i {
    color: var(--primary);
    font-size: 1.2rem;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-list li {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.info-list li:hover {
    transform: translateX(5px);
    border-color: var(--primary);
}

.info-list i {
    color: var(--primary);
    width: 20px;
    font-size: 1rem;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.action-btn {
    padding: 14px;
    border-radius: 12px;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.action-btn.secondary {
    background: var(--gray-50);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.action-btn.secondary:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.action-btn.danger {
    background: linear-gradient(135deg, #ED4245, #c73b3e);
    box-shadow: 0 4px 15px rgba(237, 66, 69, 0.3);
}

.action-btn.danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(237, 66, 69, 0.4);
}

.action-btn i {
    font-size: 1.1rem;
}

/* Состояния чата */
.chat-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.chat-empty-content {
    max-width: 400px;
}

.chat-empty i {
    font-size: 5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    opacity: 0.8;
}

.chat-empty h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.chat-empty p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.chat-empty .btn-primary {
    display: inline-block;
    text-decoration: none;
    padding: 14px 32px;
}

/* Загрузка */
.chat-loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.chat-loading p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Ошибка */
.chat-error {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.chat-error-content {
    max-width: 400px;
}

.chat-error i {
    font-size: 5rem;
    color: #ED4245;
    margin-bottom: 20px;
    opacity: 0.8;
}

.chat-error h3 {
    color: #ED4245;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.chat-error p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.chat-error .btn-primary {
    display: inline-block;
    text-decoration: none;
    padding: 14px 32px;
}

/* Уведомления */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--accent), #0d9488);
    color: white;
    padding: 16px 28px;
    border-radius: 16px;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.3s ease-out;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid white;
    min-width: 300px;
}

.notification i {
    font-size: 1.3rem;
}

.notification.success {
    background: linear-gradient(135deg, var(--accent), #0d9488);
}

.notification.error {
    background: linear-gradient(135deg, #ED4245, #c73b3e);
}

.notification.warning {
    background: linear-gradient(135deg, #FEE75C, #e6d048);
    color: var(--gray-500);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 30px rgba(37, 99, 235, 0.5);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 100% 100%;
    }
}

/* Адаптивность */
@media (max-width: 1200px) {
    .chat-main {
        grid-template-columns: 1fr 340px;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .chat-page {
        padding-top: calc(var(--header-height) + 20px);
    }
    
    .chat-header h1 {
        font-size: 2.2rem;
    }
    
    .chat-main {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
        max-height: none;
    }
    
    .chat-window {
        height: 60vh;
        min-height: 500px;
    }
    
    .chat-sidebar {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .chat-container {
        padding: 0 16px;
    }
    
    .chat-header h1 {
        font-size: 1.8rem;
    }
    
    .chat-header h1 i {
        font-size: 2rem;
    }
    
    .chat-header p {
        font-size: 1rem;
    }
    
    .chat-status {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 0 20px;
    }
    
    .status-indicator {
        justify-content: center;
    }
    
    .chat-window {
        height: 50vh;
        min-height: 400px;
    }
    
    .chat-messages {
        padding: 15px;
    }
    
    .message {
        max-width: 85%;
    }
    
    .message-content {
        padding: 12px 16px;
    }
    
    .chat-input {
        padding: 15px;
    }
    
    .chat-input-textarea {
        min-height: 50px;
        padding: 12px 90px 12px 15px;
    }
    
    .chat-input-actions {
        right: 10px;
        bottom: 10px;
    }
    
    .chat-send-btn {
        width: 38px;
        height: 38px;
    }
    
    .chat-sidebar {
        padding: 20px;
    }
    
    .user-avatar-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .notification {
        min-width: auto;
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

@media (max-width: 576px) {
    .chat-header h1 {
        font-size: 1.5rem;
        flex-wrap: wrap;
    }
    
    .chat-window {
        height: 45vh;
    }
    
    .message {
        max-width: 95%;
    }
    
    .user-stats {
        grid-template-columns: 1fr;
    }
    
    .chat-input-actions {
        position: static;
        margin-top: 12px;
        justify-content: space-between;
    }
    
    .chat-input-hint {
        flex: 1;
        text-align: center;
    }
    
    .info-list li {
        font-size: 0.85rem;
    }
    
    .action-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .chat-page {
        background: linear-gradient(135deg, #0a0a0f 0%, #000000 100%);
    }
}

/* Анимации для сообщений */
.message.user {
    animation: slideInLeft 0.3s ease-out;
}

.message.support {
    animation: slideInRight 0.3s ease-out;
}

/* Стили для системных сообщений */
.message.system .message-content {
    background: linear-gradient(135deg, var(--gray-300), var(--gray-400));
    border: 1px dashed var(--primary);
}

.message.system .message-text {
    color: var(--text-secondary);
    font-style: italic;
}

/* Индикатор непрочитанных сообщений */
.unread-indicator {
    position: relative;
}

.unread-indicator::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    animation: pulse 2s infinite;
}

/* Ссылки в сообщениях */
.message-text a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    transition: all var(--transition-fast);
}

.message-text a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Изображения в сообщениях */
.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    margin-top: 10px;
    cursor: pointer;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.message-image:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

/* Эмодзи */
.message-emoji {
    font-size: 1.2rem;
    vertical-align: middle;
}