/* ===== ریست و متغیرهای اصلی ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== بارگذاری فونت از هاست (مسیر مطلق) ===== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('https://upload.qrcodsaaz.ir/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://upload.qrcodsaaz.ir/assets/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://upload.qrcodsaaz.ir/assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://upload.qrcodsaaz.ir/assets/fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://upload.qrcodsaaz.ir/assets/fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0b1120;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-input: rgba(30, 41, 59, 0.6);
    --border: rgba(100, 116, 139, 0.2);
    --border-focus: #22d3ee;
    --fg: #f1f5f9;
    --fg-muted: #94a3b8;
    --fg-dim: #475569;
    --accent: #22d3ee;
    --accent-glow: rgba(34, 211, 238, 0.15);
    --accent-deep: #0891b2;
    --success: #34d399;
    --danger: #f87171;
    --warn: #fbbf24;
    --radius: 16px;
    --radius-sm: 10px;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-x: hidden;
}

/* ===== پس‌زمینه‌های متحرک ===== */
.bg-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse 600px 500px at 25% 20%, rgba(34, 211, 238, 0.07), transparent 70%), radial-gradient(ellipse 500px 400px at 75% 80%, rgba(8, 145, 178, 0.06), transparent 70%); }
.bg-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px); background-size: 48px 48px; }

.bg-orb { position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0; animation: orbFloat 12s ease-in-out infinite alternate; }
.bg-orb--1 { width: 300px; height: 300px; top: -80px; right: -60px; background: rgba(34, 211, 238, 0.08); }
.bg-orb--2 { width: 250px; height: 250px; bottom: -60px; left: -40px; background: rgba(8, 145, 178, 0.06); animation-delay: -4s; animation-duration: 15s; }
.bg-orb--3 { width: 180px; height: 180px; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(34, 211, 238, 0.04); animation-delay: -8s; animation-duration: 18s; }

@keyframes orbFloat { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(20px, -30px) scale(1.1); } 100% { transform: translate(-15px, 20px) scale(0.95); } }

/* ===== بریدکرامب ===== */
.breadcrumb { position: relative; z-index: 1; width: 100%; max-width: 680px; margin-bottom: 16px; font-size: 12px; color: var(--fg-dim); display: flex; gap: 8px; align-items: center; }
.breadcrumb a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--fg); text-decoration: underline; }

/* ===== کارت‌های اصلی (لاگین و سئو) ===== */
.auth-card {
    position: relative; z-index: 1; width: 100%; max-width: 440px;
    background: var(--bg-card); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.04), 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 120px rgba(34, 211, 238, 0.03);
    overflow: hidden; animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.seo-card { margin-top: 20px; animation-delay: 0.1s; }
@keyframes cardIn { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.card-header { padding: 36px 32px 28px; text-align: center; position: relative; background: linear-gradient(180deg, rgba(34, 211, 238, 0.06) 0%, transparent 100%); }
.card-header::after { content: ''; position: absolute; bottom: 0; left: 32px; right: 32px; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }

.brand-logo { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 32px rgba(34, 211, 238, 0.25); animation: logoPulse 3s ease-in-out infinite; }
@keyframes logoPulse { 0%, 100% { box-shadow: 0 8px 32px rgba(34, 211, 238, 0.25); } 50% { box-shadow: 0 8px 48px rgba(34, 211, 238, 0.35); } }
.brand-logo svg { width: 28px; height: 28px; }

.card-header h1 { font-size: 1.25rem; font-weight: 900; color: var(--fg); margin-bottom: 8px; letter-spacing: -0.3px; }
.card-header p { font-size: 13px; color: var(--fg-muted); line-height: 2; }

/* ===== فرم ورود ===== */
.card-body { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 18px; }
.field-wrap { position: relative; }
.field-input { width: 100%; padding: 14px 18px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); font-family: inherit; font-size: 15px; font-weight: 600; color: var(--fg); direction: ltr; text-align: left; transition: all 0.25s ease; outline: none; }
.field-input::placeholder { color: var(--fg-dim); font-weight: 400; }
.field-input:hover { border-color: rgba(100, 116, 139, 0.35); }
.field-input:focus { border-color: var(--accent); background: rgba(30, 41, 59, 0.9); box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(34, 211, 238, 0.06); }
.field-input:disabled, .field-input[readonly] { opacity: 0.5; cursor: not-allowed; }

/* ===== باکس‌های ویژگی ===== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.feature-item { background: rgba(30, 41, 59, 0.4); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 6px 12px; text-align: center; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); cursor: default; }
.feature-item:hover { border-color: rgba(34, 211, 238, 0.3); background: var(--accent-glow); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(34, 211, 238, 0.08); }
.fi-icon { width: 32px; height: 32px; margin: 0 auto 8px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.fi-icon--cyan { background: rgba(34, 211, 238, 0.1); }
.fi-icon--green { background: rgba(52, 211, 153, 0.1); }
.fi-icon--amber { background: rgba(251, 191, 36, 0.1); }
.fi-title { font-size: 10.5px; font-weight: 800; color: var(--fg); line-height: 1.6; margin-bottom: 4px; }
.fi-badge { display: inline-block; font-size: 9px; font-weight: 800; color: var(--accent); background: rgba(34, 211, 238, 0.08); padding: 2px 8px; border-radius: 20px; border: 1px solid rgba(34, 211, 238, 0.12); }

/* ===== دکمه‌ها ===== */
.btn-primary { 
    position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; 
    width: 100%; padding: 14px 24px; border: none; border-radius: var(--radius-sm); 
    background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: var(--bg); 
    font-family: inherit; font-size: 14px; font-weight: 800; cursor: pointer; 
    overflow: hidden; transition: all 0.25s ease; 
    min-height: 50px; /* رفع مشکل لرزش (CLS) */
}
.btn-primary::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 60%); opacity: 0; transition: opacity 0.25s; }
.btn-primary:hover:not(:disabled)::before { opacity: 1; }
.btn-primary:hover:not(:disabled) { box-shadow: 0 8px 32px rgba(34, 211, 238, 0.3); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { background: rgba(30, 41, 59, 0.6); color: var(--fg-dim); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary .btn-text { position: relative; z-index: 1; }

/* ===== پیام اعتمادساز زیر دکمه ===== */
.trust-signal { 
    text-align: center; margin-top: -10px; 
    font-size: 11px; color: var(--fg-dim); 
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* ===== بخش OTP ===== */
.otp-area { display: none; flex-direction: column; gap: 16px; animation: otpIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.otp-area.show { display: flex; }
@keyframes otpIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.otp-hint { text-align: center; font-size: 13px; color: var(--fg-muted); line-height: 1.8; }
.otp-hint strong { color: var(--fg); font-weight: 700; }
.otp-boxes { display: flex; gap: 10px; justify-content: center; direction: ltr; }
.otp-box { width: 50px; height: 58px; text-align: center; font-size: 22px; font-weight: 900; border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--fg); font-family: inherit; transition: all 0.2s ease; outline: none; caret-color: var(--accent); }
.otp-box:focus { border-color: var(--accent); background: rgba(30, 41, 59, 0.9); box-shadow: 0 0 0 3px var(--accent-glow); transform: translateY(-3px); }
.otp-box.filled { border-color: rgba(34, 211, 238, 0.4); background: rgba(34, 211, 238, 0.05); }
.otp-box::-webkit-outer-spin-button, .otp-box::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.otp-box[type=number] { -moz-appearance: textfield; }

/* ===== پیام‌ها و لودینگ ===== */
.msg-error { display: none; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; background: rgba(248, 113, 113, 0.08); border: 1px solid rgba(248, 113, 113, 0.2); border-radius: var(--radius-sm); color: var(--danger); font-size: 12.5px; font-weight: 600; animation: shakeIn 0.4s ease; }
.msg-error.show { display: flex; }
@keyframes shakeIn { 0% { transform: translateX(8px); opacity: 0; } 25% { transform: translateX(-6px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } 100% { transform: translateX(0); opacity: 1; } }
.msg-error svg { width: 16px; height: 16px; flex-shrink: 0; }

.msg-loader { display: none; align-items: center; justify-content: center; gap: 10px; padding: 12px; color: var(--fg-muted); font-size: 13px; font-weight: 600; }
.msg-loader.show { display: flex; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== محتوای سئو و نمونه‌کارها ===== */
.seo-inner { padding: 28px 32px 32px; }
.seo-inner h2 { font-size: 1.05rem; font-weight: 800; color: var(--fg); margin-bottom: 16px; text-align: center; letter-spacing: -0.3px; }
.seo-inner p { font-size: 12.5px; color: var(--fg-muted); line-height: 2.2; margin-bottom: 14px; text-align: justify; }
.seo-inner h3 { font-size: 13px; font-weight: 700; color: var(--accent); margin: 22px 0 12px; }
.seo-inner ul { list-style: none; padding: 0; margin: 12px 0; }
.seo-inner li { font-size: 12.5px; color: var(--fg-muted); line-height: 2.2; padding: 6px 0; padding-right: 20px; position: relative; }
.seo-inner li::before { content: '✓'; position: absolute; right: 0; color: var(--success); font-weight: 900; font-size: 11px; }

.samples-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 24px; }
.sample-link { text-decoration: none; display: block; }
.sample-item { background: rgba(30, 41, 59, 0.4); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 6px 14px; text-align: center; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.sample-link:hover .sample-item { border-color: rgba(34, 211, 238, 0.4); background: var(--accent-glow); transform: translateY(-4px); box-shadow: 0 12px 28px rgba(34, 211, 238, 0.1); }
.sample-icon { width: 36px; height: 36px; margin: 0 auto 10px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.sample-icon--purple { background: rgba(168, 85, 247, 0.1); }
.sample-icon--pink { background: rgba(236, 72, 153, 0.1); }
.sample-icon--blue { background: rgba(59, 130, 246, 0.1); }
.sample-title { font-size: 11px; font-weight: 800; color: var(--fg); line-height: 1.7; }

.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; overflow: hidden; transition: all 0.3s ease; }
.faq-item:hover { border-color: rgba(34, 211, 238, 0.3); }
.faq-question { padding: 14px 18px; background: rgba(30, 41, 59, 0.4); cursor: pointer; font-size: 13px; font-weight: 700; color: var(--fg); display: flex; justify-content: space-between; align-items: center; transition: all 0.3s ease; }
.faq-question:hover { background: rgba(34, 211, 238, 0.05); }
.faq-question::after { content: '+'; font-size: 18px; color: var(--accent); transition: transform 0.3s ease; flex-shrink: 0; margin-right: 12px; }
.faq-item.active .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.active .faq-answer { max-height: 200px; }
.faq-answer p { padding: 14px 18px; margin: 0; font-size: 12.5px; }

.card-footer { padding: 0 32px 24px; text-align: center; }
.card-footer p { font-size: 11px; color: var(--fg-dim); line-height: 1.8; }
.card-footer a { color: var(--accent); text-decoration: none; font-weight: 700; transition: color 0.2s; }
.card-footer a:hover { color: var(--fg); }

/* ===== استایل‌های صفحات قوانین و حریم خصوصی ===== */
.page-card { 
    position: relative; z-index: 1; width: 100%; max-width: 680px;
    background: var(--bg-card); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); 
    border: 1px solid var(--border); border-radius: var(--radius); 
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); animation: cardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; 
}
.page-header { padding: 32px; text-align: center; position: relative; background: linear-gradient(180deg, rgba(34, 211, 238, 0.06) 0%, transparent 100%); border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 1.3rem; font-weight: 900; color: var(--fg); margin-bottom: 12px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 700; transition: color 0.2s; }
.back-btn:hover { color: var(--fg); }

.page-body { padding: 32px; }
.page-body h2 { font-size: 15px; font-weight: 800; color: var(--accent); margin: 28px 0 14px; }
.page-body h2:first-child { margin-top: 0; }
.page-body p { font-size: 13.5px; color: var(--fg-muted); line-height: 2.2; margin-bottom: 16px; text-align: justify; }
.page-body ul { list-style: none; padding: 0; margin-bottom: 16px; }
.page-body li { font-size: 13.5px; color: var(--fg-muted); line-height: 2.2; padding-right: 20px; position: relative; }
.page-body li::before { content: '•'; position: absolute; right: 0; color: var(--accent); font-weight: 900; }

/* ===== ریسپانسیو ===== */
@media (max-width: 480px) {
    body { padding: 12px; justify-content: flex-start; padding-top: 24px; }
    .card-header, .seo-inner, .page-header, .page-body { padding-left: 20px; padding-right: 20px; }
    .card-header { padding-top: 28px; padding-bottom: 22px; }
    .card-body { padding: 22px 20px 26px; }
    .card-footer { padding: 0 20px 20px; }
    .otp-box { width: 44px; height: 50px; font-size: 20px; }
    .otp-boxes { gap: 7px; }
    .brand-logo { width: 48px; height: 48px; }
    .brand-logo svg { width: 24px; height: 24px; }
    .breadcrumb { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) { 
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } 
}

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }