:root {
    /* رنگ‌های اصلی */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
    --info: #3b82f6;
    
    /* رنگ‌های تم تاریک */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* سایه‌ها */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* حاشیه‌ها */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* فاصله‌ها */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* تایپوگرافی */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    /* انیمیشن */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* تم روشن */
.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
}

/* Reset و پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Vazirmatn', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: var(--space-md);
    transition: background-color var(--transition-base);
}

/* Container اصلی */
.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--space-xl));
    min-height: 600px;
}

/* هدر */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.header h1 {
    font-size: var(--font-size-2xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
}

.theme-toggle button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(15deg);
}

.room-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.room-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    backdrop-filter: blur(10px);
}

.header-buttons {
    display: flex;
    gap: var(--space-sm);
}

.btn-clear, .btn-settings {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: var(--transition-fast);
}

.btn-clear {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-clear:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-1px);
}

.btn-settings {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    justify-content: center;
}

.btn-settings:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(30deg);
}

/* بخش چت */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    overflow: hidden;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-color);
    scroll-behavior: smooth;
}

/* اسکرول بار */
.messages::-webkit-scrollbar {
    width: 8px;
}

.messages::-webkit-scrollbar-track {
    background: transparent;
}

.messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

.messages::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* پیام خوش‌آمد */
.welcome-message {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--text-muted);
}

.welcome-message i {
    margin-bottom: var(--space-lg);
    color: var(--primary);
}

.welcome-message h3 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.welcome-tips {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    border-right: 4px solid var(--primary);
}

.welcome-tips p {
    margin: var(--space-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
}

/* پیام‌ها */
.message {
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--radius-xl);
    max-width: 85%;
    position: relative;
    word-wrap: break-word;
    animation: messageAppear 0.3s ease-out;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.message:hover {
    transform: translateY(-2px);
}

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

.message.sent {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    margin-left: auto;
    border-bottom-right-radius: var(--radius-sm);
    color: white;
}

.message.received {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    margin-right: auto;
    border-bottom-left-radius: var(--radius-sm);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.message.sent .message-header {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.message-user {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.message.sent .message-user {
    color: rgba(255, 255, 255, 0.9);
}

.message.received .message-user {
    color: var(--primary);
}

.message-time {
    font-size: var(--font-size-xs);
    opacity: 0.8;
}

.message-text {
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: var(--font-size-base);
    padding: var(--space-sm) 0;
}

.message-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.message:hover .message-actions {
    opacity: 1;
}

.btn-reply, .btn-edit, .btn-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-reply:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.btn-edit:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ریپلای */
.message-reply {
    background: rgba(0, 0, 0, 0.05);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    border-right: 3px solid var(--secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.message-reply:hover {
    background: rgba(0, 0, 0, 0.08);
}

.message-reply-header {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: var(--space-xs);
}

.message-reply-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* وضعیت تایپ */
.typing-status {
    display: none;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-sm);
    border-right: 3px solid var(--primary);
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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

/* بخش ورودی */
.input-area {
    background: var(--bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    flex-shrink: 0;
}

.user-input-row, .message-input-row {
    display: flex;
    gap: var(--space-md);
}

.user-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 2px;
    border: 1px solid var(--border-color);
}

.user-input-wrapper label {
    padding: 0 var(--space-md);
    color: var(--text-muted);
}

.user-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: var(--space-md) 0;
    color: var(--text-primary);
    font-size: var(--font-size-base);
    outline: none;
}

.btn-random {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 var(--space-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-random:hover {
    color: var(--primary);
    transform: rotate(180deg);
}

.room-selector select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    cursor: pointer;
    min-width: 120px;
    outline: none;
}

/* ورودی پیام */
.message-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 2px;
    border: 1px solid var(--border-color);
}

.message-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: var(--space-md) var(--space-lg);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    outline: none;
    min-height: 50px;
}

.input-buttons {
    display: flex;
    gap: var(--space-xs);
    padding: 0 var(--space-md);
}

.btn-upload, .btn-emoji {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-upload:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.btn-emoji:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* دکمه ارسال */
.btn-send {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 0 var(--space-xl);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    transition: var(--transition-fast);
    min-width: 100px;
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-send:active {
    transform: translateY(0);
}

/* پیش‌نمایش ریپلای */
.reply-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(99, 102, 241, 0.1);
    border-right: 4px solid var(--primary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    animation: slideIn 0.3s ease-out;
}

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

.reply-content {
    flex: 1;
    overflow: hidden;
}

.reply-to {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--primary);
    display: block;
    margin-bottom: var(--space-xs);
}

.reply-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.btn-close-reply {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: var(--space-sm);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-close-reply:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* اکوردین */
.accordion-section {
    margin: var(--space-md) 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
}

.accordion-header {
    background: var(--bg-tertiary);
    padding: var(--space-md) var(--space-lg);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-fast);
    list-style: none;
    user-select: none;
}

.accordion-header:hover {
    background: rgba(99, 102, 241, 0.1);
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-icon {
    transition: transform var(--transition-fast);
}

.accordion-section[open] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
    max-height: 500px;
    overflow-y: auto;
}

/* فایل‌های آپلود شده */
.uploaded-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}

.btn-refresh {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-refresh:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.btn-refresh:active {
    transform: rotate(270deg);
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.file-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.file-item:hover {
    transform: translateX(-4px);
    border-color: var(--primary);
}

.file-icon {
    color: var(--primary);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: var(--space-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-name:hover {
    color: var(--primary);
    text-decoration: underline;
}

.file-meta {
    display: flex;
    gap: var(--space-md);
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.file-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.file-actions {
    display: flex;
    gap: var(--space-xs);
}

.file-actions button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.file-actions button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.no-files {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
    font-style: italic;
}

/* نوار فضای ذخیره‌سازی */
.storage-info {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.storage-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.storage-text {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    text-align: center;
}

/* مدال‌ها */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-md);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid var(--border-color);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.modal-body {
    padding: var(--space-lg);
    overflow-y: auto;
    max-height: 60vh;
}

/* تنظیمات */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
}

.setting-item select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    cursor: pointer;
    min-width: 120px;
}

/* سوئیچ */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
    border-radius: var(--radius-full);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    right: 3px;
    bottom: 3px;
    background: var(--text-muted);
    transition: var(--transition-fast);
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--primary);
    border-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(-30px);
    background: white;
}

/* انتخاب رنگ */
.color-picker {
    display: flex;
    gap: var(--space-sm);
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

/* ایموجی */
.emoji-modal .modal-content {
    max-width: 400px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md);
}

.emoji-item {
    font-size: var(--font-size-xl);
    cursor: pointer;
    text-align: center;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    user-select: none;
}

.emoji-item:hover {
    background: var(--bg-tertiary);
    transform: scale(1.2);
}

/* تایید */
.confirm-modal .modal-content {
    max-width: 400px;
}

.confirm-buttons {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.btn-confirm-yes, .btn-confirm-no {
    flex: 1;
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-confirm-yes {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-confirm-yes:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-confirm-no {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-confirm-no:hover {
    background: var(--border-color);
}

/* اطلاع‌رسانی */
.notification {
    position: fixed;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1001;
    max-width: 90%;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification.success {
    border-right: 4px solid var(--success);
}

.notification.error {
    border-right: 4px solid var(--danger);
}

.notification.warning {
    border-right: 4px solid var(--warning);
}

.notification.info {
    border-right: 4px solid var(--info);
}

/* فوتر */
.footer {
    text-align: center;
    margin-top: var(--space-xl);
    padding: var(--space-md);
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    border-top: 1px solid var(--border-color);
}

.footer p {
    margin: var(--space-sm) 0;
}

.version {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    margin-right: var(--space-sm);
}

.server-time {
    font-family: monospace;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

/* رسپانسیو */
@media (max-width: 768px) {
    body {
        padding: var(--space-sm);
    }
    
    .container {
        height: calc(100vh - var(--space-sm));
        border-radius: var(--radius-lg);
    }
    
    .header {
        padding: var(--space-md);
    }
    
    .room-info {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }
    
    .header-buttons {
        justify-content: center;
    }
    
    .user-input-row, .message-input-row {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .room-selector select {
        width: 100%;
    }
    
    .message {
        max-width: 90%;
        font-size: var(--font-size-sm);
    }
    
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .modal-content {
        margin: var(--space-sm);
        max-height: 80vh;
    }
    
    .file-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .file-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: var(--font-size-xl);
    }
    
    .btn-send span {
        display: none;
    }
    
    .btn-send {
        min-width: auto;
        width: 50px;
        justify-content: center;
    }
    
    .emoji-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .confirm-buttons {
        flex-direction: column;
    }
}

/* انیمیشن‌های اضافی */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.loading {
    animation: pulse 2s infinite;
}

.bounce {
    animation: bounce 0.5s infinite;
}

/* استایل برای فایل‌های مختلف */
.file-preview {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: var(--space-sm) 0;
}

.audio-player {
    width: 100%;
    margin: var(--space-sm) 0;
}

.video-player {
    width: 100%;
    max-height: 400px;
    border-radius: var(--radius-md);
    margin: var(--space-sm) 0;
}