/* فونت وزیرمتن روی خود سایت (بدون وابستگی به گوگل) */
@font-face { font-family: 'Vazirmatn'; font-weight: 400 500; font-display: swap; src: url('assets/fonts/Vazirmatn-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Vazirmatn'; font-weight: 600; font-display: swap; src: url('assets/fonts/Vazirmatn-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Vazirmatn'; font-weight: 700 900; font-display: swap; src: url('assets/fonts/Vazirmatn-Bold.ttf') format('truetype'); }

html[data-theme="dark"] body {
    background: #0b1120;
    color: #e5e7eb;
}

body {
    isolation: isolate;
}

body::before {
    content: "";
    position: fixed;
    inset: -18vh 0;
    z-index: -1;
    pointer-events: none;
    background-color: rgba(71, 85, 105, .10);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320' fill='none' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 62h62l18 18h54M238 42v42l-22 22h-34M38 222h52l18-18h36M268 190h-42l-20 20v52M144 28v30l20 20M72 146h34l18 18h32M208 286v-32l-18-18h-28'/%3E%3Ccircle cx='104' cy='62' r='5'/%3E%3Ccircle cx='238' cy='42' r='5'/%3E%3Ccircle cx='108' cy='204' r='5'/%3E%3Ccircle cx='268' cy='190' r='5'/%3E%3Ccircle cx='164' cy='28' r='4'/%3E%3Ccircle cx='156' cy='164' r='4'/%3E%3Ccircle cx='208' cy='286' r='4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320' fill='none' stroke='white' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 62h62l18 18h54M238 42v42l-22 22h-34M38 222h52l18-18h36M268 190h-42l-20 20v52M144 28v30l20 20M72 146h34l18 18h32M208 286v-32l-18-18h-28'/%3E%3Ccircle cx='104' cy='62' r='5'/%3E%3Ccircle cx='238' cy='42' r='5'/%3E%3Ccircle cx='108' cy='204' r='5'/%3E%3Ccircle cx='268' cy='190' r='5'/%3E%3Ccircle cx='164' cy='28' r='4'/%3E%3Ccircle cx='156' cy='164' r='4'/%3E%3Ccircle cx='208' cy='286' r='4'/%3E%3C/svg%3E");
    -webkit-mask-repeat: repeat;
    mask-repeat: repeat;
    -webkit-mask-size: 320px 320px;
    mask-size: 320px 320px;
    transform: translate3d(0, var(--page-scroll-shift, 0px), 0);
    will-change: transform;
}

html[data-theme="dark"] body::before {
    background-color: rgba(226, 232, 240, .09);
}

html[data-theme="liquid"] body::before {
    background-color: rgba(71, 85, 105, .08);
}

html[data-theme="dark"] body .box,
html[data-theme="dark"] body .card,
html[data-theme="dark"] body .feature-card,
html[data-theme="dark"] body .ai-item,
html[data-theme="dark"] body .result,
html[data-theme="dark"] body .theme-menu,
html[data-theme="dark"] body .panel,
html[data-theme="dark"] body .auth-card {
    background: #172033;
    color: #e5e7eb;
    border-color: #334155;
}

html[data-theme="dark"] body .theme-menu .theme-option {
    color: #f8fafc;
}

html[data-theme="dark"] body .theme-menu .theme-option:hover,
html[data-theme="dark"] body .theme-menu .theme-option.active {
    background: #cffafe;
    color: #0e7490;
}

html[data-theme="dark"] body input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body textarea,
html[data-theme="dark"] body select {
    background: #111827;
    color: #f8fafc;
    border-color: #475569;
}

html[data-theme="dark"] body label.token-plan {
    background: #111827;
    border-color: #475569;
}

html[data-theme="dark"] body label.token-plan:has(input:checked) {
    background: #12313d;
    border-color: #22d3ee;
}

html[data-theme="dark"] body .token-plan-content strong {
    color: #f8fafc;
}

html[data-theme="dark"] body .token-plan-content small {
    color: #cbd5e1;
}

html[data-theme="dark"] body .account-sidebar {
    background: #172033;
    border-color: #334155;
}

html[data-theme="dark"] body .account-nav a {
    color: #cbd5e1;
}

html[data-theme="dark"] body .account-nav a:hover,
html[data-theme="dark"] body .account-nav a[aria-current="page"] {
    background: #12313d;
    color: #a5f3fc;
}

html[data-theme="dark"] body p,
html[data-theme="dark"] body label,
html[data-theme="dark"] body small,
html[data-theme="dark"] body .meta,
html[data-theme="dark"] body .intro p,
html[data-theme="dark"] body .empty {
    color: #cbd5e1;
}

html[data-theme="dark"] body a:not(.buy):not(.btn):not(.token-balance):not(.feature-card a) {
    color: #a5d8ff;
}

html[data-theme="dark"] body .section-heading,
html[data-theme="dark"] body h1,
html[data-theme="dark"] body h2,
html[data-theme="dark"] body h3 {
    color: #f8fafc;
}

html[data-theme="liquid"] body {
    background:
        radial-gradient(ellipse at 12% 8%, rgba(255, 255, 255, .85), transparent 40%),
        radial-gradient(ellipse at 88% 20%, rgba(203, 213, 225, .34), transparent 42%),
        linear-gradient(135deg, #f8fafc, #edf0f4 55%, #f8fafc);
    background-attachment: fixed;
    color: #172554;
}

html[data-theme="liquid"] body .box,
html[data-theme="liquid"] body .card,
html[data-theme="liquid"] body .feature-card,
html[data-theme="liquid"] body .ai-item,
html[data-theme="liquid"] body .result,
html[data-theme="liquid"] body .panel,
html[data-theme="liquid"] body .auth-card {
    background: rgba(255, 255, 255, .56);
    border: 1px solid rgba(255, 255, 255, .82);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
}

html[data-theme="liquid"] body input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="liquid"] body textarea,
html[data-theme="liquid"] body select {
    background: rgba(255, 255, 255, .68);
    border-color: rgba(255, 255, 255, .9);
}

html[data-theme="liquid"] body label.token-plan {
    background: rgba(255, 255, 255, .58);
    border-color: rgba(255, 255, 255, .84);
}

html[data-theme="liquid"] body label.token-plan:has(input:checked) {
    background: rgba(207, 250, 254, .82);
    border-color: #0891b2;
}

html[data-theme="liquid"] body .account-sidebar {
    background: rgba(255, 255, 255, .46);
    border-color: rgba(255, 255, 255, .78);
    box-shadow: 0 14px 38px rgba(62, 91, 135, .12), inset 0 1px 0 rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
}

html[data-theme="liquid"] body .account-nav a[aria-current="page"] {
    background: rgba(207, 250, 254, .82);
    color: #0e7490;
}

.back-link,
.top a.back-link,
.top a[href="index.php"],
.meta a[href="index.php"],
a.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(100, 116, 139, .24);
    border-radius: 12px;
    background: rgba(255, 255, 255, .82);
    color: #334155 !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.back-link:hover,
.top a.back-link:hover,
.top a[href="index.php"]:hover,
.meta a[href="index.php"]:hover,
a.back:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(15, 23, 42, .12);
}

html[data-theme="dark"] body .back-link,
html[data-theme="dark"] body .top a.back-link,
html[data-theme="dark"] body .top a[href="index.php"],
html[data-theme="dark"] body .meta a[href="index.php"],
html[data-theme="dark"] body a.back {
    background: rgba(30, 41, 59, .92);
    border-color: #475569;
    color: #e2e8f0 !important;
}

html[data-theme="liquid"] body .back-link,
html[data-theme="liquid"] body .top a.back-link,
html[data-theme="liquid"] body .top a[href="index.php"],
html[data-theme="liquid"] body .meta a[href="index.php"],
html[data-theme="liquid"] body a.back {
    background: rgba(255, 255, 255, .48);
    border-color: rgba(255, 255, 255, .78);
    color: #164e63 !important;
    box-shadow: 0 8px 20px rgba(42, 86, 120, .12), inset 0 1px 0 rgba(255, 255, 255, .72);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
}

html body .top {
    background: linear-gradient(135deg, #0891b2, #06b6d4) !important;
}

html body .btn:not(.red):not(.gray),
html body .buy,
html body .tutorial-link,
html body .education-heading>a,
html body .education-card a,
html body button:not(.theme-toggle):not(.theme-option):not(.red):not(.gray) {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    color: #fff;
}

html body .btn:not(.red):not(.gray):hover,
html body .buy:hover,
html body button:not(.theme-toggle):not(.theme-option):not(.red):not(.gray):hover {
    box-shadow: 0 10px 22px rgba(8, 145, 178, .24);
}

html body input:focus,
html body textarea:focus,
html body select:focus {
    border-color: #0891b2 !important;
    outline-color: rgba(8, 145, 178, .28);
}

html body .alt a,
html body .category-tag,
html body .eyebrow {
    color: #0e7490 !important;
}

html body .category-tag,
html body .eyebrow {
    background: #ecfeff;
}

html body .product-placeholder,
html body .placeholder {
    background: linear-gradient(135deg, #e8fbff, #c8f4fb);
}

html body .content-box,
html body pre.content {
    border-color: #a5eaf4;
}

html body .ai-item.selected {
    outline-color: #0891b2 !important;
}

html body .card:hover,
html body .feature-card:hover {
    box-shadow: 0 10px 25px rgba(8, 145, 178, .16);
}

html[data-accent="purple"] body > header,
html[data-accent="purple"] body .top,
html[data-accent="purple"] body .side {
    background: linear-gradient(135deg, #4f46e5, #9333ea) !important;
}

html[data-accent="purple"] body .btn:not(.red):not(.gray),
html[data-accent="purple"] body .buy,
html[data-accent="purple"] body .tutorial-link,
html[data-accent="purple"] body .education-heading>a,
html[data-accent="purple"] body .education-card a,
html[data-accent="purple"] body button:not(.theme-toggle):not(.theme-option):not(.red):not(.gray),
html[data-accent="purple"] body .search-submit,
html[data-accent="purple"] body .feature-card a {
    background: linear-gradient(135deg, #4f46e5, #9333ea) !important;
    color: #fff !important;
}

html[data-accent="purple"] body .btn:not(.red):not(.gray):hover,
html[data-accent="purple"] body .buy:hover,
html[data-accent="purple"] body button:not(.theme-toggle):not(.theme-option):not(.red):not(.gray):hover,
html[data-accent="purple"] body .search-submit:hover,
html[data-accent="purple"] body .feature-card a:hover {
    box-shadow: 0 10px 24px rgba(79, 70, 229, .28);
}

html[data-accent="purple"] body .card:hover,
html[data-accent="purple"] body .feature-card:hover,
html[data-accent="purple"] body .tutorial-card:hover {
    box-shadow: 0 14px 28px rgba(79, 70, 229, .18);
}

html[data-accent="purple"] body input:focus,
html[data-accent="purple"] body textarea:focus,
html[data-accent="purple"] body select:focus {
    border-color: #7c3aed !important;
    outline-color: rgba(124, 58, 237, .28);
}

html[data-accent="purple"] body .pic,
html[data-accent="purple"] body .tabs a.on,
html[data-accent="purple"] body .srow:hover,
html[data-accent="purple"] body .back,
html[data-accent="purple"] body summary,
html[data-accent="purple"] body .alt a {
    color: #6d28d9 !important;
}

html[data-accent="purple"] body .pic {
    background: #6d28d9;
    color: #fff !important;
}

html[data-accent="purple"] body .tabs a.on {
    border-color: #7c3aed;
}

html[data-accent="purple"] body .section-heading::after {
    background: linear-gradient(90deg, #8b5cf6, #6d28d9);
}

html[data-accent="purple"] body .education-heading>a,
html[data-accent="purple"] body .education-card a {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
}

html[data-accent="purple"] body .education-empty {
    border-color: #c4b5fd;
}

html[data-accent="purple"] body[data-theme="dark"] .education-card,
html[data-accent="purple"] body[data-theme="dark"] .education-empty {
    background: #172033;
    border-color: #3b3562;
}

html[data-accent="purple"] body .category-tag,
html[data-accent="purple"] body .eyebrow {
    background: #eef2ff;
    color: #4f46e5 !important;
}

html[data-accent="purple"] body .product-placeholder,
html[data-accent="purple"] body .placeholder {
    background: linear-gradient(135deg, #eef2ff, #f3e8ff);
}

html[data-accent="purple"] body .content-box,
html[data-accent="purple"] body pre.content {
    border-color: #c4b5fd;
}

html[data-accent="purple"] body .ai-item.selected {
    outline-color: #7c3aed !important;
}

html[data-accent="purple"] body .topic-heading span,
html[data-accent="purple"] body .topic-heading>a,
html[data-accent="purple"] body .topic-index {
    color: #6d28d9;
}

html[data-accent="purple"] body .topic-tile::after {
    background: #8b5cf6;
}

html[data-accent="purple"] body .topic-tile:hover {
    border-color: #a78bfa;
    box-shadow: 0 8px 18px rgba(79, 70, 229, .12);
}

html[data-accent="purple"] body .topic-tile.active,
html[data-accent="purple"] body[data-theme="dark"] .topic-tile.active {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: #fff;
}

html[data-accent="purple"] body .topic-tile.active .topic-index,
html[data-accent="purple"] body .topic-tile.active small {
    color: #ede9fe;
}

html[data-accent="purple"] body .token-plan input {
    accent-color: #6d28d9;
}

html[data-accent="purple"] body label.token-plan:has(input:checked) {
    border-color: #7c3aed;
    background: #eef2ff;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, .12);
}

html[data-accent="purple"] body .account-nav a:hover,
html[data-accent="purple"] body .account-nav a[aria-current="page"] {
    background: #eef2ff;
    color: #4f46e5;
}

html[data-accent="purple"] body[data-theme="dark"] .category-tag,
html[data-accent="purple"] body[data-theme="dark"] .eyebrow,
html[data-accent="purple"] body[data-theme="dark"] .account-nav a:hover,
html[data-accent="purple"] body[data-theme="dark"] .account-nav a[aria-current="page"] {
    background: #252044;
    color: #c4b5fd !important;
}

html[data-accent="purple"] body[data-theme="dark"] label.token-plan:has(input:checked) {
    background: #252044;
    border-color: #8b5cf6;
}

html[data-accent="purple"] body .back-link,
html[data-accent="purple"] body .top a[href="index.php"],
html[data-accent="purple"] body .meta a[href="index.php"],
html[data-accent="purple"] body a.back {
    color: #4f46e5 !important;
    border-color: rgba(124, 58, 237, .28);
}

html[data-accent="purple"] body[data-theme="dark"] .back-link,
html[data-accent="purple"] body[data-theme="dark"] .top a[href="index.php"],
html[data-accent="purple"] body[data-theme="dark"] .meta a[href="index.php"],
html[data-accent="purple"] body[data-theme="dark"] a.back {
    background: #252044;
    color: #ddd6fe !important;
}

html[data-accent="purple"] body[data-theme="liquid"] .back-link,
html[data-accent="purple"] body[data-theme="liquid"] .top a[href="index.php"],
html[data-accent="purple"] body[data-theme="liquid"] .meta a[href="index.php"],
html[data-accent="purple"] body[data-theme="liquid"] a.back {
    background: rgba(245, 243, 255, .62);
    color: #5b21b6 !important;
}

.scroll-reveal {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
    transition-delay: var(--reveal-delay, 0ms);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal,
    .scroll-reveal.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.prompt-kind-options { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0 16px; }
label.prompt-kind-option { display:flex;align-items:center;gap:10px;min-height:64px;margin:0;padding:12px 14px;border:1px solid #d1d5db;border-radius:12px;background:#fff;cursor:pointer;transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease; }
.prompt-kind-option input { width:18px;height:18px;flex:0 0 auto;accent-color:#0891b2; }
.prompt-kind-option span { display:grid;gap:3px; }
.prompt-kind-option strong { color:#1f2937;font-size:14px; }
.prompt-kind-option small { color:#64748b;font-size:12px; }
label.prompt-kind-option:has(input:checked) { border-color:#0891b2;background:#ecfeff;box-shadow:0 0 0 2px #0891b21c; }

.file-picker { position:relative;display:flex;align-items:center;gap:12px;min-height:48px;margin:8px 0 14px;padding:6px;border:1px solid #d1d5db;border-radius:12px;background:#fff;overflow:hidden; }
.file-picker-input { position:absolute;inset:0;z-index:2;width:100%;height:100%;opacity:0;cursor:pointer; }
.file-picker-button { display:inline-flex;align-items:center;justify-content:center;min-height:34px;margin:0;padding:7px 14px;border-radius:9px;background:linear-gradient(135deg,#06b6d4,#0891b2);color:#fff;font-size:13px;font-weight:700;white-space:nowrap; }
.file-picker-name { min-width:0;overflow:hidden;color:#64748b;font-size:13px;text-overflow:ellipsis;white-space:nowrap; }
.file-picker:focus-within { outline:3px solid rgba(8,145,178,.2);outline-offset:2px; }
@media(max-width:520px){.prompt-kind-options{grid-template-columns:1fr}}

html[data-theme="dark"] body label.prompt-kind-option,
html[data-theme="dark"] body .file-picker { background:#111827;border-color:#475569; }
html[data-theme="dark"] body .prompt-kind-option strong { color:#f8fafc; }
html[data-theme="dark"] body .prompt-kind-option small,
html[data-theme="dark"] body .file-picker-name { color:#cbd5e1; }
html[data-theme="dark"] body label.prompt-kind-option:has(input:checked) { background:#12313d;border-color:#22d3ee; }
html[data-theme="liquid"] body label.prompt-kind-option,
html[data-theme="liquid"] body .file-picker { background:rgba(255,255,255,.52);border-color:rgba(255,255,255,.82); }
html[data-theme="liquid"] body label.prompt-kind-option:has(input:checked) { background:rgba(207,250,254,.72); }

html[data-accent="purple"] body .prompt-kind-option input { accent-color:#6d28d9; }
html[data-accent="purple"] body label.prompt-kind-option:has(input:checked) { border-color:#7c3aed;background:#eef2ff;box-shadow:0 0 0 2px rgba(124,58,237,.12); }
html[data-accent="purple"] body .file-picker-button { background:linear-gradient(135deg,#4f46e5,#9333ea); }
html[data-accent="purple"] body .file-picker:focus-within { outline-color:rgba(124,58,237,.25); }
