/* ریست و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

/* هدر چت */
.chat-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ddd;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.online-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4facfe;
}

.online-dot {
    color: #43e97b;
    font-size: 0.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.typing-indicator {
    font-size: 0.85rem;
    color: #ff6b6b;
    height: 20px;
    overflow: hidden;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #4facfe;
}

.auth-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

/* مودال احراز هویت */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-content {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.close-auth {
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-auth:hover {
    color: #ff6b6b;
}

.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    color: #ddd;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-btn.active {
    color: #4facfe;
    background: rgba(79, 172, 254, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #4facfe;
}

.auth-body {
    padding: 2rem;
}

.auth-form {
    display: none;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #ddd;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.avatar-upload {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.upload-btn {
    background: rgba(79, 172, 254, 0.1);
    color: #4facfe;
    border: 1px dashed #4facfe;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.upload-btn:hover {
    background: rgba(79, 172, 254, 0.2);
}

.avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-top: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.auth-footer {
    padding: 1rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #4facfe;
    text-decoration: none;
}

/* سایدبار کاربران آنلاین */
.online-users-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1500;
    overflow-y: auto;
}

.online-users-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-sidebar {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-sidebar:hover {
    color: #ff6b6b;
}

.users-list {
    padding: 1rem;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #43e97b;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 500;
    color: #fff;
}

.user-status {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* کانتینر اصلی چت */
.chat-container {
    display: flex;
    height: calc(100vh - 80px);
    padding: 1rem;
    gap: 1rem;
}

.chat-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px; /* محدودیت ارتفاع */
    min-height: 300px; /* حداقل ارتفاع */
}

/* استایل‌های اسکرول‌بار */
.messages-container::-webkit-scrollbar {
    width: 8px;
}

.messages-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #4facfe;
    border-radius: 4px;
}

/* برای تنظیمات ریسپانسیو */
@media (max-height: 800px) {
    .messages-container {
        max-height: 400px; /* کمتر برای صفحه‌های کوچک‌تر */
    }
}

@media (max-height: 600px) {
    .messages-container {
        max-height: 300px;
    }
}

/* برای موبایل */
@media (max-width: 768px) {
    .messages-container {
        max-height: 350px; /* کمتر برای موبایل */
        min-height: 250px;
    }
}

.message {
    display: flex;
    gap: 12px;
    animation: messageIn 0.3s ease;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.mine {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    max-width: 70%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 12px 16px;
    position: relative;
}

.message.mine .message-content {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.message-sender {
    font-weight: 600;
    color: #4facfe;
}

.message.mine .message-sender {
    color: white;
}

.message-time {
    font-size: 0.8rem;
    color: #888;
}

.message.mine .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.message-text {
    line-height: 1.5;
    word-wrap: break-word;
}

.message-file {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 1.5rem;
    color: #4facfe;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.file-size {
    font-size: 0.8rem;
    color: #888;
}

.download-btn {
    background: #4facfe;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.welcome-message {
    text-align: center;
    padding: 2rem;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 15px;
    margin-bottom: 1rem;
}

.welcome-message .message-avatar {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.welcome-message .message-avatar i {
    font-size: 2rem;
    color: white;
}

.welcome-message .message-text {
    font-size: 1.1rem;
}

/* نوار تایپ پیام */
.message-input-container {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.tool-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ddd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4facfe;
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

#messageInput {
    flex: 1;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

#messageInput:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

#messageInput:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* سایدبار */
.sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-users-btn {
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.3);
    color: #4facfe;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.toggle-users-btn:hover {
    background: rgba(79, 172, 254, 0.2);
}

.badge {
    background: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.chat-info, .chat-controls, .quick-links {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
}

.chat-info h3, .quick-links h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    color: #4facfe;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.control-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ddd;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.control-btn i {
    color: #4facfe;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #ddd;
    text-decoration: none;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #4facfe;
}

.quick-link i {
    color: #4facfe;
}

/* مودال تغییر آواتار */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 2rem;
}

.avatar-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.current-avatar, .new-avatar {
    text-align: center;
}

.current-avatar img, .avatar-preview-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 1rem auto;
    border: 3px solid #4facfe;
}

.avatar-preview-large {
    border: 3px dashed #4facfe;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.avatar-preview-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#newAvatarUpload {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    margin: 1rem 0;
}

.save-avatar-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #43e97b, #38f9d7);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    margin-top: 1rem;
}

.save-avatar-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(67, 233, 123, 0.3);
}

.save-avatar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ایموجی پیکر */
.emoji-picker {
    position: absolute;
    bottom: 80px;
    right: 320px;
    background: #2d3748;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    z-index: 1001;
    width: 300px;
    max-height: 300px;
    overflow-y: auto;
}

.emoji-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 1rem;
}

.emoji {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    text-align: center;
    border-radius: 5px;
    transition: background 0.3s;
}

.emoji:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    .chat-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .chat-info, .chat-controls, .quick-links {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .chat-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-left, .header-center, .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .chat-container {
        height: auto;
        min-height: calc(100vh - 120px);
    }
    
    .avatar-options {
        grid-template-columns: 1fr;
    }
    
    .emoji-picker {
        right: 20px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .messages-container {
        padding: 1rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .sidebar {
        flex-direction: column;
    }
    
    .auth-content, .modal-content {
        width: 95%;
    }
}

/* انیمیشن‌های اضافی */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* استایل برای پیام‌های سیستمی */
.system-message {
    text-align: center;
    margin: 1rem 0;
    color: #888;
    font-size: 0.9rem;
}

.system-message .message-text {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

/* استایل برای پیام‌های حاوی ایموجی */
.message-text.with-emoji {
    font-size: 1.2rem;
}

/* دکمه‌های عملیات پیام */
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    position: relative;
}

.message-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ddd;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.message-action-btn:hover {
    background: rgba(79, 172, 254, 0.3);
    color: #4facfe;
    transform: scale(1.1);
}

/* دکمه کپی مخصوص */
.copy-btn:hover {
    background: rgba(67, 233, 123, 0.3);
    color: #43e97b;
}

/* دکمه پاسخ مخصوص */
.reply-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

/* دکمه اشتراک‌گذاری مخصوص */
.share-btn:hover {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

/* برای موبایل دکمه‌ها همیشه نمایش داده شوند */
@media (max-width: 768px) {
    .message-actions {
        opacity: 1;
    }
    
    .message-action-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}

/* استایل دکمه‌های عملیات */
.message-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ddd;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.message-action-btn:hover {
    transform: scale(1.1);
}

.copy-btn:hover {
    background: rgba(67, 233, 123, 0.3);
    color: #43e97b;
}

.reply-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
}

.share-btn:hover {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.report-btn:hover {
    background: rgba(255, 87, 87, 0.3);
    color: #ff5757;
}

/* اطلاعات اضافی پیام */
.message-extra {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

.edited-badge {
    color: #ffc107;
    font-size: 0.75rem;
}

.reply-info {
    color: #4facfe;
    cursor: pointer;
}

.reply-info:hover {
    text-decoration: underline;
}

/* فوتر پیام */
.message-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.message-footer-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.message-footer-btn:hover {
    color: #4facfe;
}

.like-btn:hover {
    color: #ff6b6b;
}

.save-btn:hover {
    color: #43e97b;
}

.message-views {
    color: #888;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: auto;
}

/* استیکر */
.message-sticker {
    margin-top: 10px;
}

.message-sticker img {
    max-width: 150px;
    border-radius: 10px;
}

/* موقعیت */
.message-location {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(79, 172, 254, 0.1);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.location-link {
    color: #4facfe;
    text-decoration: none;
}

.location-link:hover {
    text-decoration: underline;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    z-index: 9999;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.toast.show {
    transform: translateY(0);
}

.toast-success {
    border-right: 4px solid #43e97b;
}

.toast-error {
    border-right: 4px solid #ff6b6b;
}

.toast-warning {
    border-right: 4px solid #ffc107;
}

.toast-info {
    border-right: 4px solid #4facfe;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.toast-content i {
    font-size: 1.2rem;
}

.toast-success .toast-content i {
    color: #43e97b;
}

.toast-error .toast-content i {
    color: #ff6b6b;
}

.toast-warning .toast-content i {
    color: #ffc107;
}

.toast-info .toast-content i {
    color: #4facfe;
}

.toast-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
}

.toast-close:hover {
    color: #fff;
}

@media (max-width: 768px) {
    .message-actions {
        opacity: 1;
    }
    
    .message-action-btn {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .toast {
        left: 20px;
        right: 20px;
        min-width: auto;
        max-width: none;
    }
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    color: #ddd;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-links a.active {
    background: #ff6b6b;
    color: white;
}

