/* CSS за IRC-style Live Chat - MVP v1.0 */

/* Chat Section */
.chat-section {
    background: #000000;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    overflow: hidden;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #00ff00;
}

.chat-header {
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    background: #1a1a1a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #00ff00;
    font-size: 14px;
    min-height: 32px;
}

.chat-header h2 {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 600;
    color: #00ff00;
}

.chat-stats {
    display: flex;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #00ff00;
}

.chat-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 255, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: #00ff00;
}

/* Chat Container */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    background: #000000;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
    background: #000000;
    scroll-behavior: smooth;
    color: #00ff00;
    font-size: 13px;
    line-height: 1.2;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #333;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Message Types - IRC Style */
.message {
    margin-bottom: 1px;
    display: flex;
    gap: 4px;
    animation: none;
    padding: 0;
    font-size: 13px;
    line-height: 1.2;
    align-items: flex-start;
}

.message:last-child {
    margin-bottom: 0;
}

/* IRC-style message format */
.message-content {
    flex: 1;
    padding: 0;
    background: transparent;
    border-radius: 0;
    word-wrap: break-word;
    line-height: 1.2;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #00ff00;
    display: inline;
    max-height: none;
    overflow: visible;
}

/* User Messages */
.message.user {
    flex-direction: row;
}

.message.user .message-content {
    color: #00ff00;
}

.message.user .message-username {
    color: #00ffff;
    font-weight: 600;
    display: inline;
    margin-right: 4px;
}

/* Bot Messages */
.message.bot {
    flex-direction: row;
}

.message.bot .message-content {
    color: #ffff00;
}

.message.bot .message-username {
    color: #ffff00;
    font-weight: 600;
    display: inline;
    margin-right: 4px;
}

/* System Messages */
.message.system {
    justify-content: center;
    margin: 2px 0;
}

.message.system .message-content {
    background: rgba(128, 0, 128, 0.1);
    color: #9370db;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    max-width: 80%;
    border: 1px solid rgba(128, 0, 128, 0.3);
    display: block;
}

/* Action Messages (/me) */
.message.action .message-content {
    color: #ff00ff;
    font-style: italic;
}

.message.action .message-username {
    color: #ff00ff;
    font-weight: 600;
    display: inline;
    margin-right: 4px;
}

/* Message Info - IRC Style */
.message-info {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
    font-size: 11px;
    justify-content: flex-start;
    color: #666;
}

/* Image Messages */
.image-message {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.2s ease;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.chat-image:hover {
    transform: scale(1.02);
}

.image-caption {
    font-size: 11px;
    color: #666;
    font-style: italic;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    cursor: pointer;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 2px;
}

.message-username {
    font-weight: 600;
    color: #00ffff;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.message-username:hover {
    color: #00cccc;
    text-decoration: underline;
}

.message-time {
    color: #666;
    font-size: 10px;
    opacity: 0.7;
}

/* Status indicators */
.user-status {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 2px;
}

.user-status.online {
    background: #00ff00;
    box-shadow: 0 0 2px rgba(0, 255, 0, 0.5);
}

.user-status.away {
    background: #ffff00;
    box-shadow: 0 0 2px rgba(255, 255, 0, 0.5);
}

.user-status.offline {
    background: #666;
}

/* Message Avatar - Hidden in chat */
.message-avatar {
    display: none;
}

/* Message Content */
.message-content {
    flex: 1;
    padding: 0;
    background: transparent;
    border-radius: 0;
    word-wrap: break-word;
    line-height: 1.2;
    max-width: none;
    color: #00ff00;
    display: inline;
    max-height: none;
    overflow: visible;
}

.message-content p {
    margin-bottom: 0;
    display: inline;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Message Info */
.message-info {
    display: flex;
    flex-direction: row;
    gap: 4px;
    margin-bottom: 0;
    color: #666;
}

.message-username {
    font-weight: 600;
    font-size: 12px;
    color: #00ffff;
    display: inline;
    margin-right: 4px;
}

.message-time {
    font-size: 12px;
    color: #666;
    margin-right: 4px;
}

/* Reaction Picker */
.reaction-picker {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-2);
    display: none;
    z-index: 1001;
    animation: reactionSlideIn 0.2s ease-out;
}

.reaction-picker.show {
    display: block;
}

@keyframes reactionSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.reaction-grid {
    display: flex;
    gap: var(--spacing-1);
}

.reaction-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--transition-fast);
    user-select: none;
}

.reaction-item:hover {
    background: var(--gray-100);
    transform: scale(1.1);
}

.reaction-item:active {
    transform: scale(0.95);
}

/* Message actions */
.message-actions {
    display: flex;
    gap: var(--spacing-2);
    margin-top: var(--spacing-2);
    opacity: 0;
    transition: opacity 0.2s ease;
    position: relative;
    z-index: 10;
}

.message:hover .message-actions {
    opacity: 1;
}

/* Показване на бутоните за собственика на съобщението */
.message.user .message-actions {
    opacity: 1;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    transition: all 0.2s ease;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.action-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.like-btn:hover {
    background: #4CAF50;
}

.reply-btn:hover {
    background: #2196F3;
}

.edit-btn:hover {
    background: #FF9800;
}

.delete-btn:hover {
    background: #F44336;
}

.reaction-btn:hover {
    background: #9C27B0;
}

/* Edit message input */
.edit-message-input {
    width: 100%;
    min-height: 60px;
    padding: var(--spacing-3);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    background: var(--white);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--font-size-base);
    resize: vertical;
    margin-bottom: var(--spacing-2);
}

.edit-message-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* Edit buttons */
.edit-buttons {
    display: flex;
    gap: var(--spacing-2);
    margin-top: var(--spacing-2);
}

.save-edit-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: background 0.2s ease;
}

.save-edit-btn:hover {
    background: #45a049;
}

.cancel-edit-btn {
    background: var(--text-muted);
    color: var(--white);
    border: none;
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: background 0.2s ease;
}

.cancel-edit-btn:hover {
    background: #666;
}

/* Edited indicator */
.edited-indicator {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    font-style: italic;
    margin-left: var(--spacing-1);
}

/* Chat Input - IRC Style */
.chat-input-container {
    background: #1a1a1a;
    border-top: 1px solid #333;
    padding: 4px 8px;
    position: relative;
}

.input-wrapper {
    display: flex;
    gap: 4px;
    align-items: flex-end;
}

#messageInput {
    flex: 1;
    background: #000000;
    border: 1px solid #333;
    border-radius: 2px;
    padding: 4px 6px;
    color: #00ff00;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    resize: none;
    min-height: 24px;
    max-height: 80px;
    transition: all var(--transition-fast);
}

#messageInput:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 0 1px rgba(0, 255, 0, 0.3);
}

#messageInput::placeholder {
    color: #666;
}

/* Command highlighting */
#messageInput.command {
    border-color: #ffff00;
    color: #ffff00;
}

#sendMessageBtn {
    background: #333;
    color: #00ff00;
    border: 1px solid #333;
    padding: 4px 8px;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 12px;
    min-width: 40px;
    max-width: 60px;
    height: 24px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

#sendMessageBtn:hover {
    background: #444;
    transform: none;
}

#sendMessageBtn:active {
    transform: none;
}

.input-actions {
    display: flex;
    gap: 2px;
    justify-content: flex-end;
}

/* Typing Indicator */
.typing-indicator {
    padding: 2px 4px;
    color: #666;
    font-size: 11px;
    font-style: italic;
    display: none;
    background: rgba(0, 255, 0, 0.05);
    border-radius: 2px;
    margin: 2px 4px;
}

.typing-indicator.show {
    display: block;
    animation: typingPulse 1.5s infinite;
}

@keyframes typingPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Message Status */
.message-status {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: #666;
    margin-top: 0;
}

.status-icon {
    width: 8px;
    height: 8px;
}

.status-sent { color: #666; }
.status-delivered { color: #00ff00; }
.status-read { color: #00ff00; }

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    bottom: calc(100% + 5px);
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    padding: 4px;
    display: none;
    z-index: 1000;
    max-width: 200px;
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 2px;
}

.emoji-picker.show {
    display: block;
    animation: emojiSlideIn 0.2s ease-out;
}

@keyframes emojiSlideIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    max-height: 120px;
    overflow-y: auto;
}

.emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition-fast);
    user-select: none;
    color: #00ff00;
}

.emoji-item:hover {
    background: #333;
    transform: scale(1.1);
}

.emoji-item:active {
    transform: scale(0.95);
}

/* File Upload */
.file-upload {
    display: none;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    background: #1a1a1a;
    border-radius: 2px;
    margin-top: 2px;
}

.file-preview img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 1px;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    font-size: 11px;
    color: #00ff00;
}

.file-size {
    font-size: 10px;
    color: #666;
}

.remove-file {
    background: none;
    border: none;
    color: #ff0000;
    cursor: pointer;
    padding: 1px;
    border-radius: 1px;
}

/* Loading States */
.message.loading .message-content {
    background: #1a1a1a;
    color: #666;
}

.message.loading .message-content::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* New message highlight */
.message.new {
    background: rgba(0, 255, 0, 0.05);
    border-left: 1px solid #00ff00;
    animation: newMessageHighlight 1s ease-out;
}

@keyframes newMessageHighlight {
    0% { background: rgba(0, 255, 0, 0.1); }
    100% { background: rgba(0, 255, 0, 0.05); }
}

/* Online Users Section */
.online-users {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.online-user {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    border-radius: 1px;
    background: rgba(0, 255, 0, 0.05);
    transition: background var(--transition-fast);
}

.online-user:hover {
    background: rgba(0, 255, 0, 0.1);
}

.online-user .user-avatar {
    font-size: 12px;
    width: 12px;
    text-align: center;
    color: #00ff00;
}

.online-user .user-name {
    font-size: 11px;
    color: #00ff00;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-online-users {
    padding: 4px;
    text-align: center;
    color: #666;
    font-size: 11px;
    font-style: italic;
}

/* Sidebar Section */
.sidebar-section {
    background: rgba(0, 255, 0, 0.05);
    border-radius: 2px;
    padding: 4px;
    margin-bottom: 4px;
}

.sidebar-section h3 {
    color: #00ff00;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chat-section {
        height: calc(100vh - 80px);
        border-radius: 0;
        box-shadow: none;
    }
    
    .chat-header {
        padding: 4px 6px;
        position: sticky;
        top: 0;
        z-index: 100;
        min-height: 24px;
    }
    
    .chat-messages {
        padding: 2px 4px;
        height: calc(100vh - 120px);
    }
    
    .chat-input-container {
        padding: 2px 4px;
        position: sticky;
        bottom: 0;
        background: #1a1a1a;
        border-top: 1px solid #333;
    }
    
    .message-content {
        max-width: none;
        font-size: 12px;
    }
    
    .input-wrapper {
        flex-direction: row;
        gap: 2px;
    }
    
    #messageInput {
        min-height: 20px;
        font-size: 12px;
        padding: 2px 4px;
    }
    
    #sendMessageBtn {
        width: auto;
        min-width: 30px;
        height: 20px;
        font-size: 10px;
    }
    
    .input-actions {
        gap: 1px;
    }
    
    .action-btn {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    /* Show sidebar on mobile as overlay */
    .sidebar {
        position: fixed;
        top: 80px;
        right: 0;
        width: 200px;
        height: calc(100vh - 80px);
        background: #000000;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
        display: block;
        border-left: 1px solid #333;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    /* Add toggle button for sidebar */
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 90px;
        right: 10px;
        z-index: 1001;
        background: #1a1a1a;
        color: #00ff00;
        border: 1px solid #333;
        border-radius: 2px;
        width: 24px;
        height: 24px;
        font-size: 12px;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 480px) {
    .chat-section {
        height: calc(100vh - 60px);
    }
    
    .chat-messages {
        height: calc(100vh - 100px);
        padding: 2px;
    }
    
    .chat-header h2 {
        font-size: 12px;
    }
    
    .chat-stats {
        flex-direction: column;
        gap: 1px;
    }
    
    .chat-stats span {
        font-size: 10px;
        padding: 1px;
    }
    
    .message-info {
        flex-direction: row;
        align-items: flex-start;
        gap: 2px;
    }
    
    .sidebar {
        width: 100%;
        top: 60px;
        height: calc(100vh - 60px);
    }
    
    .sidebar-toggle {
        top: 70px;
        right: 5px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
} 

/* Search Interface */
.search-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 4px;
    z-index: 100;
    animation: searchSlideDown 0.3s ease-out;
}

@keyframes searchSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-input-wrapper {
    display: flex;
    gap: 4px;
    align-items: center;
}

#searchInput {
    flex: 1;
    padding: 2px 4px;
    border: 1px solid #333;
    border-radius: 2px;
    font-size: 11px;
    background: #000000;
    color: #00ff00;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

#searchInput:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 0 1px rgba(0, 255, 0, 0.3);
}

/* Message Highlighting */
.message.highlight {
    background: rgba(255, 255, 0, 0.1);
    border-left: 1px solid #ffff00;
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% {
        background: rgba(255, 255, 0, 0.1);
    }
    50% {
        background: rgba(255, 255, 0, 0.2);
    }
}

/* Message Settings Menu */
.message-settings-menu {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    padding: 2px;
    min-width: 120px;
    animation: settingsSlideUp 0.2s ease-out;
}

@keyframes settingsSlideUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settings-menu-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #00ff00;
    font-size: 11px;
}

.settings-menu-item:hover {
    background: #333;
    color: #ffffff;
}

.settings-menu-item:active {
    background: #444;
    transform: scale(0.98);
}

.menu-icon {
    font-size: 12px;
    width: 12px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-weight: 500;
}

/* Settings button styling */
.settings-btn {
    background: transparent;
    border: none;
    color: #666;
    font-size: 10px;
    padding: 1px 2px;
    border-radius: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.settings-btn:hover {
    color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    opacity: 1;
}

.message:hover .settings-btn {
    opacity: 1;
}

/* User Profile Modal Styles */
.user-profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: #1a1a1a;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    border: 1px solid #333;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px solid #333;
}

.modal-header h3 {
    margin: 0;
    color: #00ff00;
    font-size: 14px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 2px;
    border-radius: 1px;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #333;
    color: #00ff00;
}

.modal-body {
    padding: 8px;
}

.user-info {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.user-avatar-large {
    font-size: 24px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border-radius: 2px;
    color: #00ff00;
}

.user-details h4 {
    margin: 0 0 2px 0;
    color: #00ff00;
    font-size: 14px;
    font-weight: 600;
}

.user-details p {
    margin: 1px 0;
    color: #666;
    font-size: 11px;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.btn-warning {
    background: #333;
    color: #ffff00;
    border: 1px solid #333;
}

.btn-warning:hover {
    background: #444;
    border-color: #444;
}

.btn-danger {
    background: #333;
    color: #ff0000;
    border: 1px solid #333;
}

.btn-danger:hover {
    background: #444;
    border-color: #444;
}

/* ========================================
   LOAD MORE BUTTON STYLES
   ======================================== */

.chat-load-more {
    text-align: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Typing indicator styles */
.typing-indicator {
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-muted);
}

.typing-text {
    font-style: italic;
}

.typing-dots {
    display: flex;
    gap: 2px;
}

.typing-dots .dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing-pulse 1.4s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dots .dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typing-pulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.load-more-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.load-more-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.load-more-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 🚀 РЕШЕНИЕ 1: Стилове за временни съобщения */
.temp-message {
    opacity: 0.7;
    border-left: 2px solid #ffaa00;
    padding-left: 8px;
    position: relative;
}

.temp-message::before {
    content: "⏳";
    position: absolute;
    left: -12px;
    top: 0;
    font-size: 10px;
    color: #ffaa00;
}

.temp-message .message-content {
    font-style: italic;
    color: #ffaa00;
}

/* Анимация за актуализиране на временни съобщения */
.message:not(.temp-message) {
    transition: all 0.3s ease-in-out;
}

.message.temp-message {
    transition: opacity 0.3s ease-in-out, border-left-color 0.3s ease-in-out;
}

/* Стилове за съобщения при грешка */
.message.error {
    border-left: 2px solid #ff4444;
    opacity: 0.8;
}

.message.error::before {
    content: "❌";
    color: #ff4444;
}

/* Анимация за премахване на съобщения */
.message.removing {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease-out;
}