:root {
    --zai-primary: #0d263c; /* سرمه‌ای تیره */
    --zai-accent: #fcb448;  /* طلایی خردلی */
    --zai-bg: #f4f7f9;
    --zai-white: #ffffff;
    --zai-text: #333333;
    --zai-radius: 16px;
    --zai-shadow: 0 10px 30px rgba(13, 38, 60, 0.1);
}

.zai-ultra-wrapper {
    max-width: 900px;
    margin: 2rem auto;
    font-family: inherit;
    direction: rtl;
    background: var(--zai-white);
    border-radius: var(--zai-radius);
    box-shadow: var(--zai-shadow);
    overflow: hidden;
    border: 1px solid rgba(13, 38, 60, 0.05);
}

/* Header */
.zai-header {
    background: var(--zai-primary);
    padding: 30px;
    text-align: center;
    color: var(--zai-accent);
}

.zai-header h2 { margin: 0; font-size: 24px; font-weight: bold; color: var(--zai-accent);}
.zai-header p { color: #fff; opacity: 0.8; margin: 10px 0 0; font-size: 14px; }

/* Wizard Steps */
.zai-step-content { padding: 30px; display: none; animation: fadeIn 0.5s ease; }
.zai-step-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Uploader Professional */
.zai-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: var(--zai-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    position: relative;
}

.zai-upload-area:hover { border-color: var(--zai-accent); background: #fffdf9; }
.zai-upload-icon { font-size: 40px; color: var(--zai-primary); margin-bottom: 10px; }
.zai-preview-container { margin-top: 20px; display: none; position: relative; }
.zai-preview-image { width: 100%; max-height: 300px; object-fit: cover; border-radius: 12px; border: 3px solid var(--zai-accent); }

/* Inputs & Form */
.zai-form-group { margin-bottom: 20px; }
.zai-form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--zai-primary); }
.zai-input, .zai-select, .zai-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 15px;
    transition: 0.3s;
    background: #fff;
}
.zai-input:focus { border-color: var(--zai-accent); outline: none; box-shadow: 0 0 0 3px rgba(252, 180, 72, 0.2); }

/* Buttons */
.zai-btn {
    background: var(--zai-primary)!important;
    color: var(--zai-accent)!important;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 17px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.zai-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(13, 38, 60, 0.3); opacity: 0.9; }
.zai-btn:disabled { background: #ccc; cursor: not-allowed; }

/* OTP & Info Modal */
.zai-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 38, 60, 0.9);
    display: none; align-items: center; justify-content: center; z-index: 1000;
    padding: 20px;
}
.zai-modal {
    background: white; padding: 30px; border-radius: 20px;
    width: 100%; max-width: 450px; position: relative;
}

/* Horizontal Results */
.zai-results-slider {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 5px 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.zai-result-card {
    min-width: 280px;
    background: #fff;
    border-right: 4px solid var(--zai-accent);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    scroll-snap-align: start;
}
.zai-result-card h4 { color: var(--zai-primary); margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; }

/* Responsive */
@media (max-width: 600px) {
    .zai-ultra-wrapper { margin: 0; border-radius: 0; }
    .zai-result-card { min-width: 85%; }
}



/*----------StyleChat-----------------*/
#zai-chat-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    background: #0099ff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content:center;
    align-items:center;
    font-size:30px;
    cursor:pointer;
    box-shadow:0 5px 15px rgba(0,0,0,0.3);
}

#zai-chat-box {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 340px;
    height: 450px;
    background: #fff;
    border-radius: 15px;
    box-shadow:0 10px 25px rgba(0,0,0,.25);
    display:none;
    flex-direction: column;
}

#zai-chat-header {
    background:#0099ff;
    padding:10px;
    color:white;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border-radius:15px 15px 0 0;
}

#zai-chat-messages {
    flex:1;
    padding:10px;
    overflow-y:auto;
}

.zai-user-msg,
.zai-ai-msg {
    padding:10px;
    margin:5px 0;
    border-radius:10px;
    max-width:80%;
}

.zai-user-msg {
    background:#e8f5ff;
    align-self:flex-end;
}

.zai-ai-msg {
    background:#f3f3f3;
    align-self:flex-start;
}

#zai-chat-input {
    padding:10px;
    display:flex;
}

#zai-chat-input input {
    flex:1;
    padding:8px;
    border-radius:8px;
    border:1px solid #ccc;
}

#zai-chat-input button {
    margin-left:5px;
    padding:8px 15px;
    background:#0099ff;
    color:white;
    border:none;
    border-radius:8px;
    cursor:pointer;
}

.zai-ai-message {
    background: #f7f7f7;
    padding: 18px;
    border-radius: 12px;
    margin: 12px 0;
    line-height: 1.8;
    direction: rtl;
    font-size: 15px;
}

.zai-ai-message h2,
.zai-ai-message h3 {
    margin-top: 18px;
    color: #333;
}

.zai-ai-message ul {
    margin: 10px 0;
    padding-left: 25px;
}

.zai-ai-message code {
    background: #eee;
    padding: 4px 6px;
    border-radius: 6px;
}

.zai-ai-message pre {
    background: #222;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
}

