        /* استایل ویجت چت */
        .chat-widget {
            position: fixed;
            bottom: 20px;
            left: 20px;
            z-index: 10000;
        }

        .chat-widget-button {
            width: 65px;
            height: 65px;
            background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 26px;
            cursor: pointer;
            box-shadow: 0 8px 32px rgba(6, 182, 212, 0.4);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            animation: float 3s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { 
                transform: translateY(0px) scale(1);
                box-shadow: 0 8px 32px rgba(6, 182, 212, 0.4);
            }
            50% { 
                transform: translateY(-10px) scale(1.02);
                box-shadow: 0 12px 40px rgba(6, 182, 212, 0.6);
            }
        }

        .chat-widget-button:hover {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 12px 40px rgba(6, 182, 212, 0.6);
        }

        .notification-badge {
            position: absolute;
            top: -3px;
            right: -3px;
            background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
            color: white;
            border-radius: 50%;
            width: 22px;
            height: 22px;
            font-size: 12px;
            font-weight: bold;
            display: none;
            align-items: center;
            justify-content: center;
            animation: pulse-badge 1.5s infinite;
            box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
            border: 2px solid white;
        }

        @keyframes pulse-badge {
            0% { 
                transform: scale(1);
                box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
            }
            50% { 
                transform: scale(1.1);
                box-shadow: 0 6px 20px rgba(244, 63, 94, 0.6);
            }
            100% { 
                transform: scale(1);
                box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4);
            }
        }

        .chat-window {
            position: absolute;
            bottom: 75px;
            left: 0;
            width: 380px;
            height: 520px;
            background: white;
            border-radius: 20px;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            border: 1px solid rgba(6, 182, 212, 0.1);
        }

        @keyframes slideUp {
            from { 
                opacity: 0;
                transform: translateY(30px) scale(0.9);
            }
            to { 
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .chat-header {
            background: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
            color: white;
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        .chat-header::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
            animation: rotate 20s linear infinite;
        }

        @keyframes rotate {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }

        .status-indicator {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #10b981;
            position: relative;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
        }

        .status-indicator::after {
            content: '';
            position: absolute;
            top: -3px;
            left: -3px;
            right: -3px;
            bottom: -3px;
            border-radius: 50%;
            background: inherit;
            opacity: 0.4;
            animation: pulse-ring 2s infinite;
        }

        @keyframes pulse-ring {
            0% { transform: scale(1); opacity: 0.4; }
            50% { transform: scale(1.3); opacity: 0; }
            100% { transform: scale(1); opacity: 0.4; }
        }

        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background: linear-gradient(180deg, #f0fdfa 0%, #e6fffa 50%, #ccfbf1 100%);
            position: relative;
        }

        .chat-messages::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.2), transparent);
        }

        .message {
            max-width: 80%;
            margin: 10px 0;
            padding: 14px 18px;
            border-radius: 20px;
            font-size: 14px;
            line-height: 1.5;
            animation: messageSlide 0.3s ease-out;
            position: relative;
            word-wrap: break-word;
        }

        @keyframes messageSlide {
            from { 
                opacity: 0;
                transform: translateY(15px) scale(0.95);
            }
            to { 
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .user-message {
            background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
            color: white;
            margin-left: auto;
            border-bottom-right-radius: 6px;
            box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
        }

        .admin-message {
            background: white;
            color: #374151;
            border: 1px solid rgba(6, 182, 212, 0.2);
            margin-right: auto;
            border-bottom-left-radius: 6px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        }

        .system-message {
            background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
            color: #92400e;
            text-align: center;
            margin: 15px auto;
            font-size: 13px;
            border-radius: 15px;
            padding: 12px 20px;
            max-width: 90%;
            box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
            border: 1px solid rgba(251, 191, 36, 0.3);
            font-weight: 500;
        }

        .typing-indicator {
            display: none;
            padding: 14px 18px;
            font-size: 13px;
            color: #6b7280;
            font-style: italic;
            margin-right: auto;
            background: white;
            border-radius: 20px;
            border-bottom-left-radius: 6px;
            max-width: 80px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
            border: 1px solid rgba(6, 182, 212, 0.2);
        }

        .typing-indicator span {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
            margin: 0 2px;
            animation: typing 1.4s infinite;
        }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

        @keyframes typing {
            0%, 60%, 100% {
                transform: translateY(0) scale(1);
            }
            30% {
                transform: translateY(-12px) scale(1.2);
            }
        }

        .chat-input-container {
            padding: 20px;
            border-top: 1px solid rgba(6, 182, 212, 0.1);
            background: white;
            border-bottom-left-radius: 20px;
            border-bottom-right-radius: 20px;
        }

        .hidden {
            display: none !important;
        }

        /* اسکرول بار زیبا */
        .chat-messages::-webkit-scrollbar {
            width: 8px;
        }

        .chat-messages::-webkit-scrollbar-track {
            background: rgba(6, 182, 212, 0.05);
            border-radius: 10px;
        }

        .chat-messages::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(8, 145, 178, 0.3) 100%);
            border-radius: 10px;
        }

        .chat-messages::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, rgba(6, 182, 212, 0.5) 0%, rgba(8, 145, 178, 0.5) 100%);
        }

        /* رسپانسیو */
        @media (max-width: 640px) {
            .chat-widget {
                bottom: 15px;
                left: 15px;
                right: 15px;
            }
            
            .chat-widget-button {
                width: 60px;
                height: 60px;
                font-size: 24px;
            }
            
            .chat-window {
                width: 100%;
                height: calc(100vh - 90px);
                left: 0;
                right: 0;
                bottom: 75px;
                border-radius: 20px 20px 0 0;
            }
            
            .chat-input-container {
                border-radius: 0;
            }
        }

        /* افکت‌های ویژه */
        .message-time {
            font-size: 11px;
            opacity: 0.8;
            margin-top: 5px;
            font-weight: 500;
        }

        .emoji-picker {
            position: absolute;
            bottom: 70px;
            right: 10px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
            padding: 15px;
            display: none;
            grid-template-columns: repeat(8, 1fr);
            gap: 8px;
            z-index: 100;
            border: 1px solid rgba(6, 182, 212, 0.1);
        }

        .emoji-btn {
            width: 35px;
            height: 35px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.2s;
            font-size: 20px;
        }

        .emoji-btn:hover {
            background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
            transform: scale(1.3) rotate(10deg);
        }

        /* افکت‌های ورودی */
        #message-input {
            transition: all 0.3s ease;
        }

        #message-input:focus {
            box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
            border-color: #06b6d4;
        }

        /* افکت دکمه ارسال */
        #send-btn {
            transition: all 0.3s ease;
        }

        #send-btn:hover {
            transform: scale(1.1) rotate(-5deg);
        }

        #send-btn:active {
            transform: scale(0.95);
        }

        /* حالت تاریک */
        @media (prefers-color-scheme: dark) {
            .chat-window {
                background: #1e293b;
                color: #f1f5f9;
            }
            
            .chat-messages {
                background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
            }
            
            .admin-message {
                background: #334155;
                color: #f1f5f9;
                border-color: rgba(6, 182, 212, 0.3);
            }
            
            .chat-input-container {
                background: #1e293b;
                border-color: rgba(6, 182, 212, 0.2);
            }
            
            #message-input {
                background: #334155;
                border-color: rgba(6, 182, 212, 0.3);
                color: #f1f5f9;
            }
            
            .emoji-picker {
                background: #1e293b;
                border-color: rgba(6, 182, 212, 0.2);
            }
            
            .emoji-btn:hover {
                background: #334155;
            }
        }