/* ========================================
   Root Variables
   ======================================== */
   
@font-face {

    font-family: 'IRANSansX';

    src:
    url('/public/fonts/IRANSansXFaNum-Regular.woff2')
    format('woff2');

    font-weight:400;

    font-style:normal;

    font-display:optional;

}



@font-face {

    font-family: 'IRANSansX';

    src:
    url('/public/fonts/IRANSansXFaNum-Bold.woff2')
    format('woff2');

    font-weight:700;

    font-style:normal;

    font-display:optional;

}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary: #4f46e5;
    --text: #1f2937;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --glass: rgba(255,255,255,.55);
    --glass-dark: rgba(255,255,255,.35);
    --shadow: 0 20px 50px rgba(15,23,42,.08);
    --shadow-hover: 0 25px 60px rgba(15,23,42,.12);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: all .3s ease;
}

/* 2. رزرو فضا برای تصاویر */
img:not([width]):not([height]) {
   /* width: 100%; */
   /* height: auto; */
}

/* 3. المان‌های ثابت */
.toast-container,
.login-modal,
.processing-modal,
.fullscreen-modal {
    position: fixed !important;
    z-index: 99999 !important;
}

/* 4. رزرو فضا برای نتیجه */
#resultContainer {
    min-height: 200px;
}

/* 5. جلوگیری از جابه‌جایی تب‌ها */
.tabs {
    display: flex;
    min-height: 50px;
}

/* ========================================
   Reset & Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.pb-col{
    display:flex;
    align-items: center;
    justify-content: center;
    align-content: center;
}
.pb-image{
    width:50%;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    align-items: center;
    text-align: center;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IRANSansX', Tahoma, sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #eef2ff, #f8fafc, #dbeafe);
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 80px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 75%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 8px 20px rgba(37,99,235,.25);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37,99,235,.35);
}

.btn-outline {
    background: rgba(255,255,255,.5);
    color: var(--text);
    border: 1px solid rgba(148,163,184,.3);
}
.btn-outline:hover {
    background: rgba(255,255,255,.8);
    border-color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #059669);
    color: white;
    box-shadow: 0 8px 20px rgba(22,163,74,.25);
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(22,163,74,.35);
}

/* ========================================
   Header
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,.4);
    padding: 15px 0;
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(255,255,255,.85);
    box-shadow: 0 4px 20px rgba(0,0,0,.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}
.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
    padding: 5px;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: rgba(255,255,255,.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,.4);
    padding: 50px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,.3);
}

.footer-brand p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}
.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
}
.social-links a:hover {
    background: var(--primary);
    color: white;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text);
}
.footer-links a {
    display: block;
    color: var(--text-light);
    font-size: 13px;
    padding: 5px 0;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-links a i { width: 20px; }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    background: rgba(37,99,235,.1);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(37,99,235,.15);
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Features
   ======================================== */
.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}
.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}


/* ============================================ */
/* سیستم Toast نوتیفیکیشن */
/* ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 450px;
    padding: 0 20px;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    color: #f8fafc;
    padding: 16px 24px;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.toast-icon.success {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.toast-icon.error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
}

.toast-icon.info {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
}

.toast-icon.warning {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

.toast-content strong {
    font-weight: 700;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* رنگ‌های مختلف برای Toast */
.toast.success {
    background: linear-gradient(135deg, #065f46, #047857);
    border-color: rgba(74, 222, 128, 0.2);
}

.toast.error {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-color: rgba(248, 113, 113, 0.2);
}

.toast.info {
    background: linear-gradient(135deg, #1e3a5f, #1e40af);
    border-color: rgba(96, 165, 250, 0.2);
}

.toast.warning {
    background: linear-gradient(135deg, #78350f, #92400e);
    border-color: rgba(251, 191, 36, 0.2);
}

/* انیمیشن پیشرفت */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 0 0 14px 14px;
    transition: width 0.1s linear;
}

.toast-progress.success {
    background: #4ade80;
}

.toast-progress.error {
    background: #f87171;
}

.toast-progress.info {
    background: #60a5fa;
}

.toast-progress.warning {
    background: #fbbf24;
}

/* واکنش‌گرایی */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        padding: 0 10px;
    }
    
    .toast {
        padding: 14px 18px;
        font-size: 13px;
        border-radius: 12px;
    }
    
    .toast-icon {
        font-size: 20px;
        width: 32px;
        height: 32px;
    }
}

.feature-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(37,99,235,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    margin: 0 auto 15px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.feature-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    padding: 60px 20px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-box {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 50px 30px;
    border: 1px solid rgba(255,255,255,.6);
}
.cta-box h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}
.cta-box p {
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 30px;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
    animation: fadeUp .6s ease forwards;
    opacity: 0;
}

.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    body { padding-top: 70px; }

    .hero-title { font-size: 32px; }
    .hero-desc { font-size: 16px; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255,255,255,.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid rgba(255,255,255,.4);
        box-shadow: 0 10px 30px rgba(0,0,0,.05);
        gap: 10px;
    }
    .nav-links.open { display: flex; }

    .mobile-toggle { display: block; }

    .header-actions .btn-outline,
    .header-actions .btn-primary {
        font-size: 12px;
        padding: 8px 14px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    .social-links { justify-content: center; }
    .footer-links a { text-align: center; }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .cta-box { padding: 30px 20px; }
    .cta-box h2 { font-size: 22px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 26px; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .section-title { font-size: 24px; }
}

/* ============================================
   ORDER PAGE - افزایش اعتبار
   ============================================ */

/* Page Layout */
.order-page {
    padding: 0px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.order-page .page-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text);
    text-align: center;
}

.order-page .page-excerpt {
    text-align: center;
    color: var(--text-light);
    font-size: 16px;
    margin-bottom: 30px;
}

/* Service Box */
.service-box {
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.service-box .service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.service-box .service-header .badge-service {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.service-box .service-header .price-tag {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: var(--text-light);
    font-size: 15px;
}

.service-box .service-header .price-tag i,
.service-box .service-header .price-tag svg {
    color: #16a34a;
}

.service-box .service-header .count-badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: var(--text-light);
    font-size: 13px;
    background: rgba(37, 99, 235, 0.08);
    padding: 4px 12px;
    border-radius: 12px;
}

/* Credit Box */
.credit-box {
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.credit-box.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.uploadbxd {
    background: rgb(255 129 0 / 39%);
    border: 1px solid rgb(255 129 0 / 54%);
    border-radius: 10px;
    text-align: center;
    /* margin: 10px; */
    padding: 15px;
}

.credit-box.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.credit-box .credit-info {
    color: #166534;
}

.credit-box .credit-info.error {
    color: #991b1b;
}

.credit-box .credit-info i {
    color: #16a34a;
}

.credit-box .credit-info.error i {
    color: #dc2626;
}

.credit-box .service-cost {
    color: #64748b;
    font-size: 13px;
}

.credit-box .service-cost strong {
    color: #2563eb;
}

.credit-box .insufficient {
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed rgba(148, 163, 184, 0.4);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
}

.drop-zone:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.drop-zone.dragover {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.drop-zone.has-file {
    border-color: #16a34a;
    background: rgba(22, 163, 74, 0.05);
}

.drop-zone .drop-content i {
    font-size: 36px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.drop-zone .drop-content p {
    color: #94a3b8;
    font-size: 13px;
    margin: 0;
}

.drop-zone .drop-content .sub-text {
    font-size: 11px;
}

.drop-zone .drop-content .file-types {
    font-size: 10px;
    margin-top: 5px;
}

.drop-zone .preview-container {
    display: none;
    margin-top: 8px;
    width: 100%;
}

.drop-zone .preview-container img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
}

.drop-zone .remove-image {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: none;
    padding: 3px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 5px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.drop-zone .remove-image:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Upload Info */
.upload-info {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 15px;
    text-align: center;
}

/* Submit Button */
.btn-submit-order {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
}

.btn-submit-order:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

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

.btn-submit-order.disabled {
    background: #dc2626;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Result Container */
.result-container {
    display: none;
    margin-top: 25px;
}

.processing-status {
    display: none;
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 14px;
}

.processing-status i {
    font-size: 36px;
    color: #2563eb;
}

.processing-status p {
    margin-top: 15px;
    color: #64748b;
    font-weight: 500;
}

.processing-status .sub-text {
    font-size: 13px;
    color: #94a3b8;
}

.result-display {
    display: none;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.result-display .result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.result-display .result-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #16a34a;
}

.result-display .result-header .badge-ai {
    font-size: 13px;
    color: #94a3b8;
}

.result-display .result-image-wrapper {
    text-align: center;
    position: relative;
}

.result-display .result-image-wrapper img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.result-display .result-image-wrapper img:hover {
    transform: scale(1.02);
}

.result-display .result-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.result-display .result-actions .btn-download {
    width: auto;
    padding: 10px 30px;
    background: linear-gradient(135deg, #16a34a, #059669);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.result-display .result-actions .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
}

.result-display .result-actions .btn-fullscreen {
    width: auto;
    padding: 10px 30px;
    background: rgba(37, 99, 235, 0.15);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
}

.result-display .result-actions .btn-fullscreen:hover {
    background: rgba(37, 99, 235, 0.25);
    transform: translateY(-2px);
}

.result-display .result-actions .btn-reset {
    width: auto;
    padding: 10px 30px;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
}

.result-display .result-actions .btn-reset:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* Error Display */
.error-display {
    display: none;
    margin-top: 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.error-display i {
    color: #dc2626;
    font-size: 28px;
    display: block;
    margin-bottom: 10px;
}

.error-display p {
    color: #991b1b;
    font-weight: 500;
}

.error-display .btn-retry {
    width: auto;
    padding: 10px 30px;
    margin-top: 15px;
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
}

.error-display .btn-retry:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
}

/* Fullscreen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.fullscreen-modal .modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s ease;
}

.fullscreen-modal .modal-close:hover {
    transform: rotate(90deg);
}

.fullscreen-modal img {
    max-width: 95%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Login Modal */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.login-modal .modal-box {
    background: white;
    border-radius: 24px;
    max-width: 450px;
    width: 100%;
    padding: 35px;
    margin: 20px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    direction: rtl;
}

.login-modal .modal-box .close-btn {
    position: absolute;
    top: 15px;
    left: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s ease;
}

.login-modal .modal-box .close-btn:hover {
    color: #dc2626;
}

.login-modal .modal-box .modal-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1f2937;
}

.login-modal .modal-box .modal-title i {
    color: #2563eb;
}

.login-modal .modal-box .modal-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 25px;
}

.login-modal .modal-box .tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 25px;
}

.login-modal .modal-box .tabs .tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-weight: 600;
    color: #94a3b8;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    transition: all 0.3s ease;
}

.login-modal .modal-box .tabs .tab-btn.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}

.login-modal .modal-box .tab-content {
    display: none;
}

.login-modal .modal-box .tab-content.active {
    display: block;
}

.login-modal .modal-box .form-group {
    margin-bottom: 15px;
}

.login-modal .modal-box .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1f2937;
}

.login-modal .modal-box .form-group .input-with-btn {
    display: flex;
    gap: 10px;
}

.login-modal .modal-box .form-group .input-with-btn input {
    flex: 1;
}

.login-modal .modal-box .form-group .input-with-btn .btn-send-otp {
    width: auto;
    height: 48px;
    padding: 0 20px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: white;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 0.3s ease;
}

.login-modal .modal-box .form-group .input-with-btn .btn-send-otp:hover:not(:disabled) {
    background: #1d4ed8;
}

.login-modal .modal-box .form-group .input-with-btn .btn-send-otp:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-modal .modal-box .btn-submit-auth {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.login-modal .modal-box .btn-submit-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.login-modal .modal-box .terms-text {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: #94a3b8;
}

.login-modal .modal-box .terms-text a {
    color: #2563eb;
    text-decoration: none;
}

.login-modal .modal-box .terms-text a:hover {
    text-decoration: underline;
}

/* Page Content */
.page-content {
    margin-top: 20px;
    font-size: 16px;
    line-height: 2;
    color: var(--text);
}

.page-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 25px 0 15px;
    color: var(--text);
}

.page-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--text);
}

.page-content p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-content ul, .page-content ol {
    padding-right: 25px;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-content li {
    margin-bottom: 8px;
}

.page-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 15px 0;
}

.page-content blockquote {
    background: rgba(37, 99, 235, 0.05);
    border-right: 4px solid var(--primary);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: var(--radius-sm);
    color: var(--text-light);
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.page-content table th,
.page-content table td {
    padding: 10px 15px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    text-align: right;
}

.page-content table th {
    background: rgba(37, 99, 235, 0.05);
    font-weight: 600;
}

/* Keywords */
.keywords {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keywords span {
    background: rgba(37, 99, 235, 0.08);
    color: var(--text-light);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .order-page {
        padding: 20px 10px;
    }
    
    .order-page .page-title {
        font-size: 24px;
    }
    
    .service-box {
        padding: 20px;
    }
    
    .service-box .service-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .service-box .service-header .badge-service,
    .service-box .service-header .price-tag,
    .service-box .service-header .count-badge {
        justify-content: center;
    }
    
    .credit-box {
        flex-direction: column;
        text-align: center;
    }
    
    .drop-zone {
        min-height: 140px;
        padding: 15px;
    }
    
    .result-display .result-header {
        flex-direction: column;
        text-align: center;
    }
    
    .result-display .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .result-display .result-actions button,
    .result-display .result-actions .btn-download {
        width: 100%;
        justify-content: center;
    }
    
    .login-modal .modal-box {
        padding: 25px;
        margin: 15px;
    }
    
    .login-modal .modal-box .form-group .input-with-btn {
        flex-direction: column;
    }
    
    .login-modal .modal-box .form-group .input-with-btn .btn-send-otp {
        width: 100%;
    }
}

/* ============================================ */
/* سیستم Toast نوتیفیکیشن */
/* ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 450px;
    padding: 0 20px;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    color: #f8fafc;
    padding: 16px 24px;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    position: relative;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.toast-icon.success {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
}

.toast-icon.error {
    color: #f87171;
    background: rgba(248, 113, 113, 0.15);
}

.toast-icon.info {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
}

.toast-icon.warning {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
}

.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.toast.success {
    background: linear-gradient(135deg, #065f46, #047857);
    border-color: rgba(74, 222, 128, 0.2);
}

.toast.error {
    background: linear-gradient(135deg, #7f1d1d, #991b1b);
    border-color: rgba(248, 113, 113, 0.2);
}

.toast.info {
    background: linear-gradient(135deg, #1e3a5f, #1e40af);
    border-color: rgba(96, 165, 250, 0.2);
}

.toast.warning {
    background: linear-gradient(135deg, #78350f, #92400e);
    border-color: rgba(251, 191, 36, 0.2);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 0 0 14px 14px;
    transition: width 0.1s linear;
}

.toast-progress.success {
    background: #4ade80;
}

.toast-progress.error {
    background: #f87171;
}

.toast-progress.info {
    background: #60a5fa;
}

.toast-progress.warning {
    background: #fbbf24;
}

@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        padding: 0 10px;
    }
    
    .toast {
        padding: 14px 18px;
        font-size: 13px;
        border-radius: 12px;
    }
    
    .toast-icon {
        font-size: 20px;
        width: 32px;
        height: 32px;
    }
}

/* ============================================ */
/* مودال لودینگ پردازش */
/* ============================================ */
.processing-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s ease;
}

.processing-modal.active {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.processing-modal-box {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 28px;
    padding: 48px 56px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.processing-modal-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.08), transparent 60%);
    animation: shimmerBg 4s ease-in-out infinite;
}

@keyframes shimmerBg {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

/* ===== Spinner ===== */
.processing-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #4f46e5;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    border-right-color: #818cf8;
    animation-delay: 0.2s;
    inset: 8px;
}

.spinner-ring:nth-child(3) {
    border-bottom-color: #a5b4fc;
    animation-delay: 0.4s;
    inset: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #818cf8;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9); opacity: 0.7; }
}

/* ===== Text ===== */
.processing-title {
    font-size: 20px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 8px;
    position: relative;
    z-index: 1;
}

.processing-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 20px;
    position: relative;
    z-index: 1;
}

/* ===== Progress Bar ===== */
.processing-progress {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #818cf8, #4f46e5);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: progressShimmer 1.5s ease-in-out infinite;
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Tip ===== */
.processing-tip {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 20px;
    position: relative;
    z-index: 1;
}

.processing-tip i {
    color: #818cf8;
    margin-left: 8px;
}

/* ===== Cancel Button ===== */
.processing-cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    font-family: 'IRANSansX', 'IRANSans', 'Tahoma', sans-serif !important;
}

.processing-cancel:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .processing-modal-box {
        padding: 32px 24px;
        max-width: 95%;
    }
    
    .processing-spinner {
        width: 72px;
        height: 72px;
    }
    
    .spinner-icon {
        font-size: 24px;
    }
    
    .processing-title {
        font-size: 17px;
    }
}

/* ============================================ */
/* محیط نگارش پرامپت (Prompt Studio) */
/* برای سرویس‌های ساخت عکس (input_count = 10) */
/* ============================================ */
.prompt-studio {
    position: relative;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    margin-bottom: 20px;
    animation: promptGradientShift 8s ease infinite;
    background-size: 200% 200%;
}

@keyframes promptGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.prompt-studio-inner {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
}

.prompt-studio-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.prompt-studio-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.prompt-studio-title {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.prompt-studio-subtitle {
    font-size: 12.5px;
    color: #64748b;
    margin: 2px 0 0;
}

.prompt-studio-textarea-wrapper {
    position: relative;
}

.prompt-studio-textarea {
    width: 100%;
    min-height: 160px;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    padding: 16px 18px;
    font-size: 14.5px;
    line-height: 1.9;
    color: #1e293b;
    resize: vertical;
    transition: all 0.25s ease;
    font-family: 'IRANSansX', 'IRANSans', 'Tahoma', sans-serif !important;
}

.prompt-studio-textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.prompt-studio-textarea::placeholder {
    color: #94a3b8;
}

.prompt-studio-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-studio-hint {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.prompt-studio-counter {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

.prompt-studio-counter.warn {
    color: #ef4444;
}

.prompt-studio-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.prompt-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'IRANSansX', 'IRANSans', 'Tahoma', sans-serif !important;
}

.prompt-chip:hover {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #6d28d9;
}

@media (max-width: 480px) {
    .order-page .page-title {
        font-size: 20px;
    }
    
    .service-box .service-header .badge-service {
        font-size: 12px;
    }
    
    .credit-box {
        font-size: 13px;
    }
    
    .fullscreen-modal .modal-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }
}