/* استایل‌های چت هوش مصنوعی شریف - طراحی مشکی و آبی */
:root {
    --ai-primary: #0b1220;
    --ai-secondary: #1f2937;
    --ai-blue: #3b82f6;
    --ai-blue-light: #60a5fa;
    --ai-blue-dark: #2563eb;
    --ai-text: #e5e7eb;
    --ai-text-muted: #9ca3af;
    --ai-border: #374151;
    --ai-success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--ai-primary);
    color: var(--ai-text);
    direction: rtl;
    height: 100vh;
    overflow: hidden;
}

/* هدر */
.ai-header {
    background: var(--ai-secondary);
    border-bottom: 2px solid var(--ai-blue);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.ai-header h1 {
    color: var(--ai-blue);
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-header h1::before {
    content: "🤖";
    font-size: 28px;
}

.ai-header .back-link {
    color: var(--ai-text);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s;
    border: 1px solid var(--ai-border);
}

.ai-header .back-link:hover {
    background: var(--ai-blue);
    border-color: var(--ai-blue);
}

/* فرم ورود شماره */
.phone-form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 80px);
    padding: 20px;
}

.phone-form {
    background: var(--ai-secondary);
    border: 2px solid var(--ai-blue);
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.phone-form h2 {
    color: var(--ai-blue);
    margin-bottom: 24px;
    text-align: center;
    font-size: 22px;
}

.phone-form p {
    color: var(--ai-text-muted);
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--ai-text);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--ai-primary);
    border: 2px solid var(--ai-border);
    border-radius: 8px;
    color: var(--ai-text);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--ai-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--ai-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.submit-btn:hover {
    background: var(--ai-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* کانتینر چت */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    max-width: 1200px;
    margin: 0 auto;
    background: var(--ai-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--ai-secondary);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--ai-blue);
    border-radius: 4px;
}

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

/* پیام‌ها */
.message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: var(--ai-blue);
}

.message.ai .message-avatar {
    background: var(--ai-secondary);
    border: 2px solid var(--ai-blue);
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message.user .message-content {
    background: var(--ai-blue);
    color: white;
    border-radius: 12px 12px 0 12px;
}

.message.ai .message-content {
    background: var(--ai-secondary);
    color: var(--ai-text);
    border: 1px solid var(--ai-border);
    border-radius: 12px 12px 12px 0;
}

.message-time {
    font-size: 11px;
    color: var(--ai-text-muted);
    margin-top: 4px;
}

/* نشانگر تایپینگ */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--ai-secondary);
    border: 1px solid var(--ai-border);
    border-radius: 12px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--ai-blue);
    border-radius: 50%;
    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);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* فرم ورود پیام */
.chat-input-container {
    padding: 20px;
    background: var(--ai-secondary);
    border-top: 2px solid var(--ai-border);
}

.chat-input-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input-wrapper {
    flex: 1;
    position: relative;
}

.chat-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--ai-primary);
    border: 2px solid var(--ai-border);
    border-radius: 12px;
    color: var(--ai-text);
    font-size: 16px;
    font-family: inherit;
    resize: none;
    min-height: 50px;
    max-height: 120px;
    transition: all 0.3s;
}

.chat-input:focus {
    outline: none;
    border-color: var(--ai-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.send-btn {
    padding: 12px 24px;
    background: var(--ai-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    min-width: 80px;
    height: 50px;
}

.send-btn:hover {
    background: var(--ai-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* پیام خوش‌آمد */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: var(--ai-text-muted);
}

.welcome-message h2 {
    color: var(--ai-blue);
    margin-bottom: 12px;
    font-size: 24px;
}

.welcome-message p {
    font-size: 16px;
    line-height: 1.8;
}

/* حالت مخفی */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .ai-header h1 {
        font-size: 20px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .phone-form {
        padding: 24px;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .chat-input-container {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .ai-header {
        padding: 12px 16px;
    }
    
    .ai-header h1 {
        font-size: 18px;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 14px;
    }
}


