﻿/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Vazirmatn', sans-serif;
    /* جلوگیری از حالت تاریک خودکار */
    color-scheme: light;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
    /* اجباری کردن حالت روشن */
    background-color: #667eea !important;
    color: #333 !important;
}

/* ==================== MAIN CONTAINER ==================== */
.myda-chat-container {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    /* اجباری کردن رنگ‌ها */
    background-color: white !important;
    color: #333 !important;
}

/* ==================== SIDEBAR (DESKTOP) ==================== */
.chat-sidebar {
    width: 320px;
    background: linear-gradient(180deg, #6A3093 0%, #8B5FBF 100%);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
    flex-shrink: 0;
    height: 100%;
    position: relative;
    z-index: 10;
}

.sidebar-header {
    margin-bottom: 30px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

    .logo i {
        color: #00ff88;
        font-size: 1.6rem;
    }

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

.new-chat-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 14px 20px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

    .new-chat-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }

.model-selector {
    margin-bottom: 24px;
}

.model-dropdown {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .model-dropdown:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .model-dropdown option {
        background: #6A3093;
        color: white;
        padding: 10px;
    }

.conversation-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}

.conversation-item {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
}

    .conversation-item:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateX(5px);
    }

    .conversation-item.active {
        background: rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .conversation-item i {
        font-size: 1.1rem;
        opacity: 0.8;
    }

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

    .user-info:hover {
        background: rgba(255, 255, 255, 0.15);
    }

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.user-name {
    flex: 1;
    font-weight: 500;
}

/* ==================== CHAT MAIN AREA ==================== */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    height: 100%;
    position: relative;
    /* اجباری کردن رنگ سفید */
    background-color: white !important;
    color: #333 !important;
}

.chat-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    flex-shrink: 0;
    z-index: 10;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    /* اجباری کردن رنگ سفید */
    background-color: white !important;
    color: #333 !important;
    border-color: #f0f0f0 !important;
}

.active-model {
    display: flex;
    align-items: center;
    gap: 12px;
}

.model-label {
    color: #666;
    font-size: 0.9rem;
}

.model-indicator {
    background: linear-gradient(135deg, #8B5FBF, #4776E6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(139, 95, 191, 0.3);
}

.chat-controls {
    display: flex;
    gap: 12px;
}

.control-btn {
    background: white;
    border: 1px solid #e0e0e0;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
}

    .control-btn:hover {
        background: #f8f9ff;
        border-color: #A46EDB;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(164, 110, 219, 0.15);
        color: #8B5FBF;
    }

    .control-btn i {
        font-size: 1rem;
    }

/* ==================== MESSAGES AREA ==================== */
.messages-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
    position: relative;
    -webkit-overflow-scrolling: touch;
    /* اجباری کردن رنگ روشن */
    background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%) !important;
}

/* Assistant message - RIGHT side */
.message-bubble.assistant {
    align-self: flex-start;
    flex-direction: row;
}

/* User message - LEFT side */
.message-bubble.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-bubble {
    display: flex;
    gap: 16px;
    max-width: 70%;
    animation: messageSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

/* AI Avatar */
.message-bubble.assistant .message-avatar {
    background: linear-gradient(135deg, #8B5FBF, #4776E6);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 95, 191, 0.4);
}

/* User Avatar */
.message-bubble.user .message-avatar {
    background: linear-gradient(135deg, #C850C0, #A46EDB);
    color: white;
    box-shadow: 0 4px 20px rgba(200, 80, 192, 0.4);
}

.message-content {
    background: white;
    padding: 20px 24px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid #f0f0f0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    /* اجباری کردن رنگ سفید */
    background-color: white !important;
    color: #333 !important;
}

/* AI Message Content */
.message-bubble.assistant .message-content {
    background: white;
    color: #333;
    border-left: 4px solid #8B5FBF;
    box-shadow: 0 4px 25px rgba(139, 95, 191, 0.1);
}

/* User Message Content */
.message-bubble.user .message-content {
    background: linear-gradient(135deg, #8B5FBF, #4776E6);
    color: white;
    border-right: 4px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 25px rgba(139, 95, 191, 0.2);
}

.message-text {
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ==================== MODERN MESSAGE ACTIONS ==================== */
.message-actions {
    position: absolute;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    padding: 6px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

/* AI Message Actions (LEFT side) */
.message-bubble.assistant .message-actions {
    top: -15px;
    left: 15px;
    right: auto;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(139, 95, 191, 0.1);
}

/* User Message Actions (RIGHT side) */
.message-bubble.user .message-actions {
    top: -15px;
    right: 15px;
    left: auto;
    background: rgba(139, 95, 191, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-content:hover .message-actions {
    opacity: 1;
    transform: translateY(0);
}

/* Modern Action Buttons */
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

    .action-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #8B5FBF, #4776E6);
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 10px;
    }

    .action-btn i {
        position: relative;
        z-index: 1;
    }

    .action-btn:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 6px 15px rgba(139, 95, 191, 0.3);
    }

        .action-btn:hover::before {
            opacity: 1;
        }

        .action-btn:hover i {
            color: white;
        }

/* Specific button styles */
.copy-btn:hover {
    background: linear-gradient(135deg, #00c853, #64dd17);
}

    .copy-btn:hover::before {
        background: linear-gradient(135deg, #00c853, #64dd17);
    }

.download-btn:hover {
    background: linear-gradient(135deg, #2979ff, #00b0ff);
}

    .download-btn:hover::before {
        background: linear-gradient(135deg, #2979ff, #00b0ff);
    }

/* User message action buttons */
.message-bubble.user .action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

    .message-bubble.user .action-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
    }

    .message-bubble.user .action-btn::before {
        background: rgba(255, 255, 255, 0.3);
    }

/* Tooltip for buttons */
.action-btn::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.action-btn:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -30px;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.message-bubble.user .message-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

.model-tag {
    background: rgba(139, 95, 191, 0.1);
    color: #8B5FBF;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
}

.message-bubble.user .model-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ==================== INPUT SECTION ==================== */
.input-section {
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    background: white;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03);
    /* اجباری کردن رنگ سفید */
    background-color: white !important;
    border-color: #f0f0f0 !important;
}

.input-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 8px;
}

.message-input {
    flex: 1;
    padding: 18px 22px;
    border: 2px solid #e0e0e0;
    border-radius: 18px;
    resize: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 60px;
    max-height: 150px;
    background: #fafbff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    /* اجباری کردن رنگ‌ها */
    background-color: #fafbff !important;
    color: #333 !important;
    border-color: #e0e0e0 !important;
}

    .message-input:focus {
        outline: none;
        border-color: #8B5FBF;
        background: white;
        box-shadow: 0 0 0 4px rgba(139, 95, 191, 0.15);
        transform: translateY(-1px);
    }

    .message-input::placeholder {
        color: #999;
    }

.send-message-btn {
    background: linear-gradient(135deg, #8B5FBF, #4776E6);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    font-size: 1.3rem;
    box-shadow: 0 6px 25px rgba(139, 95, 191, 0.3);
}

    .send-message-btn:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 10px 30px rgba(139, 95, 191, 0.4);
        background: linear-gradient(135deg, #7A4FAA, #3765D4);
    }

    .send-message-btn:active {
        transform: translateY(-1px) scale(0.98);
    }

    .send-message-btn:disabled {
        background: #bdc3c7;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
        opacity: 0.6;
    }

        .send-message-btn:disabled:hover {
            transform: none;
            box-shadow: 0 6px 25px rgba(139, 95, 191, 0.3);
        }

.input-footer {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    padding-top: 10px;
}

/* ==================== COPY NOTIFICATION ==================== */
.copy-notification {
    position: fixed;
    top: 30px;
    right: 30px;
    background: linear-gradient(135deg, #8B5FBF, #4776E6);
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(139, 95, 191, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1), slideOutRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) 2.5s forwards;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%) translateY(-20px);
        opacity: 0;
    }
}

.copy-notification i {
    font-size: 1.2rem;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* ==================== TYPING & PROGRESS STYLES ==================== */
.progress-ring {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 40px;
}

.progress-circle {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.status-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    color: white;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.status-text {
    font-size: 0.8rem;
    color: #666;
    flex: 1;
}

.progress-percent {
    font-size: 0.8rem;
    font-weight: 600;
    color: #8B5FBF;
    min-width: 40px;
    text-align: left;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 0;
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: #8B5FBF;
    border-radius: 50%;
    animation: typingPulse 1.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes typingPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* ==================== CODE HIGHLIGHTING ==================== */
.message-text code {
    background: rgba(139, 95, 191, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace, 'Vazirmatn';
    font-size: 0.9em;
    color: #8B5FBF;
    border: 1px solid rgba(139, 95, 191, 0.2);
}

.message-bubble.user .message-text code {
    background: rgba(255, 255, 255, 0.15);
    color: #ffcc00;
    border-color: rgba(255, 255, 255, 0.2);
}

.message-text pre {
    background: rgba(139, 95, 191, 0.05);
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 12px 0;
    border: 1px solid rgba(139, 95, 191, 0.1);
    font-family: 'Courier New', monospace, 'Vazirmatn';
}

.message-bubble.user .message-text pre {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ==================== SCROLLBAR STYLING ==================== */
.messages-area::-webkit-scrollbar,
.chat-sidebar::-webkit-scrollbar {
    width: 8px;
}

.messages-area::-webkit-scrollbar-track,
.chat-sidebar::-webkit-scrollbar-track {
    background: rgba(139, 95, 191, 0.05);
    border-radius: 4px;
}

.messages-area::-webkit-scrollbar-thumb,
.chat-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8B5FBF, #4776E6);
    border-radius: 4px;
    transition: all 0.3s ease;
}

    .messages-area::-webkit-scrollbar-thumb:hover,
    .chat-sidebar::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #7A4FAA, #3765D4);
        transform: scale(1.1);
    }

/* ==================== SPECIAL EFFECTS ==================== */
.ai-glow {
    animation: pulseGlow 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 25px rgba(139, 95, 191, 0.4);
    }

    50% {
        box-shadow: 0 0 35px rgba(139, 95, 191, 0.8), 0 0 50px rgba(71, 118, 230, 0.4);
    }
}

/* ==================== MOBILE RESPONSIVE (UNDER 768px) ==================== */
@media (max-width: 768px) {
    body {
        padding: 0;
        background: #667eea !important;
        height: 100vh;
        display: block;
        overflow: hidden;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    .myda-chat-container {
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        flex-direction: column;
        background: white !important;
        border: none;
    }

    /* Hide sidebar on mobile */
    .chat-sidebar {
        display: none;
    }

    .chat-main {
        width: 100%;
        height: 100vh;
        background: white !important;
    }

    .chat-header {
        padding: 18px 20px;
        position: sticky;
        top: 0;
        background: white !important;
        z-index: 100;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        color: #333 !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .model-label {
        color: #666 !important;
    }

    .model-indicator {
        font-size: 0.8rem;
        padding: 7px 14px;
        background: linear-gradient(135deg, #8B5FBF, #4776E6) !important;
        color: white !important;
    }

    .control-btn {
        background: white !important;
        border: 1px solid #e0e0e0 !important;
        color: #666 !important;
        padding: 10px 14px;
    }

        .control-btn span {
            display: none;
        }

    .messages-area {
        padding: 18px 16px;
        gap: 16px;
        flex: 1;
        min-height: 0;
        max-height: calc(100vh - 170px);
        background: linear-gradient(180deg, #fafbff 0%, #ffffff 100%) !important;
    }

    .message-bubble {
        max-width: 88%;
        gap: 14px;
    }

    .message-avatar {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .message-content {
        padding: 16px 20px;
        border-radius: 18px;
    }

    .message-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Mobile message actions - always visible but smaller */
    .message-actions {
        opacity: 0.9;
        top: -12px;
        padding: 5px;
        transform: scale(0.9);
        gap: 6px;
    }

    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

        .action-btn::after {
            display: none; /* Hide tooltips on mobile */
        }

    .message-content:hover .message-actions {
        opacity: 1;
        transform: scale(0.95);
    }

    .input-section {
        padding: 18px 20px;
        position: sticky;
        bottom: 0;
        background: white !important;
        border-top: 1px solid #f0f0f0 !important;
        z-index: 100;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }

    .input-wrapper {
        gap: 14px;
    }

    .message-input {
        padding: 16px 20px;
        min-height: 58px;
        font-size: 0.95rem;
        max-height: 120px;
        background: #fafbff !important;
        color: #333 !important;
        border: 2px solid #e0e0e0 !important;
        border-radius: 16px;
    }

        .message-input:focus {
            border-color: #8B5FBF !important;
            background: white !important;
            color: #333 !important;
        }

    .send-message-btn {
        width: 56px;
        height: 56px;
        font-size: 1.2rem;
        border-radius: 16px;
        background: linear-gradient(135deg, #8B5FBF, #4776E6) !important;
    }

    .input-footer {
        font-size: 0.8rem;
        color: #888 !important;
        padding-top: 8px;
    }

    .copy-notification {
        top: 20px;
        right: 20px;
        left: 20px;
        padding: 14px 20px;
        font-size: 0.9rem;
        border-radius: 14px;
    }
}

/* ==================== SMALL MOBILE RESPONSIVE (UNDER 480px) ==================== */
@media (max-width: 480px) {
    .messages-area {
        padding: 16px 14px;
        gap: 14px;
        max-height: calc(100vh - 165px);
    }

    .message-bubble {
        max-width: 92%;
        gap: 12px;
    }

    .message-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .message-content {
        padding: 14px 18px;
        border-radius: 16px;
    }

    .message-text {
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .chat-header {
        padding: 16px 18px;
    }

    .model-indicator {
        font-size: 0.78rem;
        padding: 6px 12px;
    }

    .input-section {
        padding: 16px 18px;
    }

    .message-input {
        padding: 14px 18px;
        min-height: 56px;
        max-height: 110px;
        font-size: 0.92rem;
    }

    .send-message-btn {
        width: 54px;
        height: 54px;
        font-size: 1.1rem;
    }

    .action-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}

/* ==================== MOBILE LANDSCAPE ==================== */
@media (max-height: 600px) and (orientation: landscape) {
    .myda-chat-container {
        height: 100vh;
    }

    .messages-area {
        max-height: calc(100vh - 140px);
        padding: 12px;
        gap: 12px;
    }

    .message-bubble {
        max-width: 85%;
        gap: 10px;
    }

    .message-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .message-content {
        padding: 12px 16px;
    }

    .message-text {
        font-size: 0.88rem;
        line-height: 1.4;
    }

    .input-section {
        padding: 12px 16px;
    }

    .message-input {
        min-height: 52px;
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .send-message-btn {
        width: 52px;
        height: 52px;
    }
}

/* ==================== FORCE LIGHT MODE - NO DARK MODE SUPPORT ==================== */
/* حذف کامل پشتیبانی از حالت تاریک */
html, body,
.myda-chat-container,
.chat-main,
.chat-header,
.messages-area,
.input-section,
.message-input,
.message-content,
.control-btn {
    color-scheme: light !important;
    background-color: white !important;
    color: #333 !important;
}

/* ==================== SAFARI/iOS SPECIFIC FIXES ==================== */
@supports (-webkit-touch-callout: none) {
    .messages-area {
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
    }

    .input-section {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .message-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ==================== LARGE SCREEN SUPPORT ==================== */
@media (min-width: 1600px) {
    .myda-chat-container {
        max-width: 1400px;
        height: 85vh;
    }

    .chat-sidebar {
        width: 350px;
        padding: 30px;
    }

    .messages-area {
        padding: 30px;
    }

    .message-bubble {
        max-width: 65%;
    }
}
