:root[data-theme="dark"] {
    --bg-body: #050814; --bg-card: #0f172a; --bg-card-hover: #1e293b;
    --primary: #3b82f6; --primary-hover: #2563eb; --accent: #f59e0b;
    --text-main: #f8fafc; --text-muted: #94a3b8; --border-color: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 40px rgba(0,0,0,0.6); --header-bg: rgba(5, 8, 20, 0.85);
    --btn-grad: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}
:root[data-theme="light"] {
    --bg-body: #f8fafc; --bg-card: #ffffff; --bg-card-hover: #f1f5f9;
    --primary: #2563eb; --primary-hover: #1d4ed8; --accent: #d97706;
    --text-main: #0f172a; --text-muted: #64748b; --border-color: rgba(0, 0, 0, 0.08);
    --shadow: 0 20px 40px rgba(0,0,0,0.06); --header-bg: rgba(255, 255, 255, 0.85);
    --btn-grad: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}
:root[data-theme="ocean"] {
    --bg-body: #011627; --bg-card: #032b4a; --bg-card-hover: #073f69;
    --primary: #06b6d4; --primary-hover: #0891b2; --accent: #f59e0b;
    --text-main: #ecfeff; --text-muted: #7dd3fc; --border-color: rgba(6, 182, 212, 0.2);
    --shadow: 0 20px 40px rgba(1, 22, 39, 0.7); --header-bg: rgba(1, 22, 39, 0.85);
    --btn-grad: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%);
}
:root[data-theme="galaxy"] {
    --bg-body: #0f021f; --bg-card: #1f0838; --bg-card-hover: #2e0d52;
    --primary: #c084fc; --primary-hover: #a855f7; --accent: #fbbf24;
    --text-main: #faf5ff; --text-muted: #e9d5ff; --border-color: rgba(192, 132, 252, 0.2);
    --shadow: 0 20px 40px rgba(15, 2, 31, 0.7); --header-bg: rgba(15, 2, 31, 0.85);
    --btn-grad: linear-gradient(135deg, #c084fc 0%, #9333ea 100%);
}
:root[data-theme="forest"] {
    --bg-body: #021a12; --bg-card: #062e21; --bg-card-hover: #0a4734;
    --primary: #10b981; --primary-hover: #059669; --accent: #fbbf24;
    --text-main: #ecfdf5; --text-muted: #6ee7b7; --border-color: rgba(16, 185, 129, 0.2);
    --shadow: 0 20px 40px rgba(2, 26, 18, 0.7); --header-bg: rgba(2, 26, 18, 0.85);
    --btn-grad: linear-gradient(135deg, #10b981 0%, #047857 100%);
}
:root[data-theme="amber"] {
    --bg-body: #160d03; --bg-card: #271705; --bg-card-hover: #3b2308;
    --primary: #f59e0b; --primary-hover: #d97706; --accent: #38bdf8;
    --text-main: #fffbeb; --text-muted: #fde68a; --border-color: rgba(245, 158, 11, 0.2);
    --shadow: 0 20px 40px rgba(22, 13, 3, 0.7); --header-bg: rgba(22, 13, 3, 0.85);
    --btn-grad: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Vazirmatn', sans-serif; scroll-behavior: smooth; }
body { background-color: var(--bg-body); color: var(--text-main); line-height: 1.8; transition: background 0.4s ease, color 0.4s ease; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }

.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-body); display: flex; justify-content: center;
    align-items: center; z-index: 99999; transition: opacity 0.4s ease;
}
.loader-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.spinner-ring {
    width: 60px; height: 60px; border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary); border-radius: 50%;
    animation: spin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}
.loader-brand { font-size: 18px; font-weight: 900; color: var(--text-main); letter-spacing: -0.5px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.theme-panel {
    position: fixed; left: 20px; top: 50%; transform: translateY(-50%);
    background: var(--bg-card); border: 1px solid var(--border-color);
    padding: 12px; border-radius: 40px; display: flex; flex-direction: column; gap: 12px;
    box-shadow: var(--shadow); z-index: 9999; align-items: center; backdrop-filter: blur(12px);
}
.theme-toggle-btn {
    width: 42px; height: 42px; border-radius: 50%; background: var(--btn-grad); color: #fff;
    border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: 0.3s;
}
.theme-toggle-btn:hover { transform: scale(1.15) rotate(15deg); }
.theme-options { display: none; flex-direction: column; gap: 10px; padding-top: 8px; border-top: 1px solid var(--border-color); }
.theme-panel.active .theme-options { display: flex; }
.t-btn { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: 0.3s; }
.t-dark { background: #050814; } .t-light { background: #ffffff; border-color: #cbd5e1; }
.t-ocean { background: #06b6d4; } .t-galaxy { background: #c084fc; }
.t-forest { background: #10b981; } .t-amber { background: #f59e0b; }
.t-btn:hover { transform: scale(1.25); }

header { background: var(--header-bg); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-color); position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; }
.nav-container { max-width: 1350px; margin: 0 auto; padding: 16px 35px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 10px; letter-spacing: -0.5px; }
.logo i { color: var(--primary); } .logo span { color: var(--primary); }

nav ul { display: flex; list-style: none; gap: 28px; align-items: center; }
nav ul li a { font-size: 14px; font-weight: 600; color: var(--text-muted); transition: 0.3s; }
nav ul li a:hover { color: var(--primary); text-shadow: 0 0 10px rgba(59,130,246,0.3); }

.btn {
    padding: 13px 28px; border-radius: 14px; font-weight: 700; font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: inline-flex; align-items: center;
    justify-content: center; gap: 10px; cursor: pointer; border: none; text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.btn-primary { background: var(--btn-grad); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4); filter: brightness(1.1); }

.btn-outline { background: rgba(255,255,255,0.03); border: 2px solid var(--border-color); color: var(--text-main); backdrop-filter: blur(5px); }
.btn-outline:hover { border-color: var(--primary); background: rgba(59, 130, 246, 0.1); transform: translateY(-3px); }

.btn-light { background: #ffffff; color: var(--primary); font-weight: 800; }
.btn-light:hover { background: #f1f5f9; transform: translateY(-3px); }

.w-100 { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }

.mobile-menu-btn { display: none; font-size: 24px; cursor: pointer; color: var(--text-main); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 25px; }
section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 34px; font-weight: 900; margin-bottom: 12px; letter-spacing: -1px; }
.section-header p { color: var(--text-muted); font-size: 15px; }

.hero {
    min-height: 90vh; padding: 180px 0 100px; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; text-align: center;
}
.globe-container {
    position: absolute; width: 500px; height: 500px; top: 50%; left: 50%;
    transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1e293b 0%, #030712 80%);
    box-shadow: inset -30px -30px 70px rgba(0,0,0,0.9), 0 0 50px rgba(59,130,246,0.25);
    overflow: hidden; z-index: 0; opacity: 0.5; animation: floatGlobe 6s ease-in-out infinite alternate;
}
.globe-grid {
    position: absolute; width: 200%; height: 100%;
    background: repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(59,130,246,0.15) 40px, rgba(59,130,246,0.15) 42px),
                repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(59,130,246,0.15) 40px, rgba(59,130,246,0.15) 42px);
    animation: spinGlobe 25s linear infinite;
}
@keyframes spinGlobe { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes floatGlobe { 0% { transform: translate(-50%, -52%); } 100% { transform: translate(-50%, -48%); } }

.iran-pin-wrapper {
    position: absolute; top: 43%; left: 57%; transform: translate(-50%, -50%);
    z-index: 1; display: flex; align-items: center; justify-content: center;
}
.gold-ring {
    width: 60px; height: 60px; border: 3px solid var(--accent); border-radius: 50%;
    position: absolute; box-shadow: 0 0 20px var(--accent), inset 0 0 10px var(--accent);
    animation: pulseRing 2s infinite;
}
@keyframes pulseRing { 0% { transform: scale(0.7); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

.hero-content { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3); padding: 6px 18px; border-radius: 30px;
    font-size: 13px; color: var(--primary); margin-bottom: 20px; font-weight: 700;
}
.hero h1 { font-size: 48px; font-weight: 900; margin-bottom: 20px; line-height: 1.25; letter-spacing: -1px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 17px; color: var(--text-muted); max-width: 750px; margin: 0 auto 35px; }
.hero-btns { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }

.promo-box {
    background: var(--btn-grad); color: #fff; text-align: center; border-radius: 24px;
    padding: 35px; box-shadow: var(--shadow);
}
.promo-box h3 { font-size: 24px; margin-bottom: 10px; font-weight: 800; }
.promo-box p { color: rgba(255,255,255,0.9); font-size: 15px; margin-bottom: 20px; }

/* استایل بخش هوش مصنوعی */
.ai-showcase-box {
    background: var(--bg-card); border: 2px solid var(--primary); border-radius: 35px;
    padding: 50px 40px; box-shadow: 0 0 30px rgba(59, 130, 246, 0.15); text-align: center;
}
.ai-badge {
    display: inline-flex; align-items: center; gap: 8px; background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent); color: var(--accent); padding: 6px 20px;
    border-radius: 30px; font-size: 14px; font-weight: 800; margin-bottom: 20px;
}
.ai-feature-card {
    background: var(--bg-body); border: 1px solid var(--border-color); border-radius: 20px;
    padding: 25px; text-align: right; transition: 0.3s;
}
.ai-feature-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.ai-feature-card i { font-size: 28px; color: var(--primary); margin-bottom: 15px; display: block; }
.ai-feature-card h4 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.ai-feature-card p { font-size: 13px; color: var(--text-muted); }

/* چینش ۴ تایی پلن‌ها در هر خط */
.grid-4-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.plan-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 24px;
    padding: 30px 20px; display: flex; flex-direction: column; justify-content: space-between;
    position: relative; transition: 0.3s; box-shadow: var(--shadow);
}
.plan-card:hover { transform: translateY(-6px); border-color: var(--primary); background: var(--bg-card-hover); }
.plan-card.popular { border-color: var(--primary); background: var(--bg-card-hover); box-shadow: 0 15px 30px rgba(59,130,246,0.2); }
.plan-badge {
    position: absolute; top: -12px; right: 20px; background: var(--primary); color: #fff;
    font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 20px;
}
.plan-card.popular .plan-badge { background: var(--accent); }
.plan-card h3 { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.plan-price { font-size: 18px; font-weight: 900; color: var(--primary); margin-bottom: 20px; }
.plan-price span { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }

.card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 24px;
    padding: 35px; transition: all 0.35s ease; box-shadow: var(--shadow);
    position: relative; overflow: hidden; backdrop-filter: blur(10px);
}
.card:hover { transform: translateY(-6px); border-color: var(--primary); background: var(--bg-card-hover); }

.card-icon {
    width: 65px; height: 65px; background: rgba(59, 130, 246, 0.1); color: var(--primary);
    display: flex; align-items: center; justify-content: center; border-radius: 18px;
    font-size: 26px; margin-bottom: 22px; transition: 0.3s;
}
.card:hover .card-icon { background: var(--btn-grad); color: #fff; transform: scale(1.1); }

.card h3 { font-size: 21px; font-weight: 800; margin-bottom: 12px; }
.card p { color: var(--text-muted); font-size: 14px; margin-bottom: 22px; }

.check-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 25px; }
.check-list li { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 10px; }
.check-list li i { color: var(--accent); font-size: 13px; }

.feature-banner { background: var(--bg-card); border-radius: 35px; padding: 60px 40px; border: 1px solid var(--border-color); }

.faq-grid { max-width: 850px; margin: 0 auto; display: flex; flex-direction: column; gap: 15px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 22px; cursor: pointer; transition: 0.3s; }
.faq-item:hover { border-color: var(--primary); }
.faq-q { font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.faq-a { color: var(--text-muted); font-size: 14px; margin-top: 12px; display: none; line-height: 1.7; }
.faq-item.active .faq-a { display: block; }

.contact-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 28px; padding: 45px; max-width: 750px; margin: 0 auto; box-shadow: var(--shadow); }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.form-control {
    width: 100%; padding: 14px 18px; background: var(--bg-body); border: 1px solid var(--border-color);
    border-radius: 12px; color: var(--text-main); font-size: 14px; transition: 0.3s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 15px rgba(59,130,246,0.2); }

footer { background: var(--bg-card); border-top: 1px solid var(--border-color); padding: 70px 0 25px; margin-top: 90px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; margin-bottom: 45px; }
.footer-col h4 { font-size: 17px; font-weight: 800; margin-bottom: 20px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul li a { color: var(--text-muted); font-size: 14px; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--primary); padding-right: 5px; }
.copyright { text-align: center; padding-top: 22px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 13px; }

@media(max-width: 1200px) {
    .grid-4-plans { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width: 992px) {
    nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: var(--bg-card); padding: 25px; border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow); }
    nav ul.show { display: flex; }
    .mobile-menu-btn { display: block; }
    .hero h1 { font-size: 34px; }
    .globe-container { width: 320px; height: 320px; }
    .grid-4-plans { grid-template-columns: 1fr; }
    .theme-panel { left: 10px; top: auto; bottom: 20px; transform: none; flex-direction: row; border-radius: 40px; padding: 8px 14px; }
    .theme-options { flex-direction: row; border-top: none; border-right: 1px solid var(--border-color); padding-top: 0; padding-right: 10px; }
}
/* =====  Mobile-first / web-app polish (added) ===== */
html { -webkit-text-size-adjust: 100%; }
:root { --safe-b: env(safe-area-inset-bottom, 0px); }
img, svg, i.fa-solid, i.fa-regular { max-width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: 16px; }
input, textarea { -webkit-appearance: none; appearance: none; }
textarea { min-height: 110px; resize: vertical; }
::selection { background: var(--primary); color: #fff; }

/* hero on small screens: keep it dramatic but fit */
@media(max-width: 480px) {
    .hero { min-height: auto; padding: 120px 0 70px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 14px; margin-bottom: 25px; }
    .hero-badge { font-size: 11px; padding: 5px 12px; }
    .globe-container { width: 230px; height: 230px; opacity: .45; }
    .iran-pin-wrapper { width: 46px; height: 46px; }
    .iran-pin-wrapper .gold-ring { width: 66px; height: 66px; }
    .container { padding: 0 16px; }
    section { padding: 55px 0; }
    .section-header h2 { font-size: 22px; }
    .section-header p { font-size: 13px; }
    .btn { padding: 12px 18px; font-size: 13px; border-radius: 12px; }
    .promo-box { padding: 24px 16px; border-radius: 18px; }
    .promo-box h3 { font-size: 17px; }
    .promo-box p { font-size: 13px; }
    .ai-showcase-box { padding: 28px 14px; border-radius: 22px; }
    .ai-showcase-box h2 { font-size: 19px !important; }
    .ai-feature-card { padding: 18px 14px; }
    .plan-card { padding: 20px 14px; border-radius: 18px; }
    .plan-price { font-size: 15px; }
    .check-list li { font-size: 12px; }
    .contact-box { padding: 24px 16px; border-radius: 20px; }
    .card { padding: 22px 16px; border-radius: 18px; }
    .card h3 { font-size: 17px; }
    .footer-grid { gap: 25px; }
    footer { padding: 45px 0 20px; margin-top: 55px; }
    .copyright { font-size: 11px; }
    .logo { font-size: 19px; }
    .nav-container { padding: 12px 16px; }
    .theme-panel { gap: 8px; }
    .theme-toggle-btn { width: 38px; height: 38px; }
}

/* sticky bottom action bar — web-app feel */
.mobile-cta {
    display: none;
}
@media(max-width: 992px) {
    body { padding-bottom: calc(64px + var(--safe-b)); }
    .mobile-cta {
        position: fixed; bottom: 0; left: 0; width: 100%;
        display: flex; gap: 8px; padding: 10px 12px calc(10px + var(--safe-b));
        background: var(--header-bg); backdrop-filter: blur(18px);
        border-top: 1px solid var(--border-color); z-index: 1001;
    }
    .mobile-cta a { flex: 1; padding: 12px 8px; font-size: 13px; border-radius: 12px; }
    .mobile-cta a:nth-child(1) { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-main); }
    .mobile-cta a:nth-child(2) { background: var(--btn-grad); color: #fff; }
}

/* domain search box */
.domain-search-wrap { max-width: 820px; margin: 0 auto; text-align: center; }
.ds-title { font-size: 30px; font-weight: 900; margin-bottom: 8px; }
.ds-sub { color: var(--text-muted); font-size: 14px; margin-bottom: 22px; }
.domain-search-form { display: flex; gap: 10px; background: var(--bg-card); border: 1px solid var(--border-color); padding: 10px; border-radius: 18px; box-shadow: var(--shadow); }
.domain-search-form input {
    flex: 1; min-width: 0; padding: 15px 16px; background: var(--bg-body);
    border: 1px solid var(--border-color); border-radius: 12px; color: var(--text-main); font-size: 15px; font-weight: 600;
    direction: ltr; text-align: left;
}
.domain-search-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 15px rgba(59,130,246,.2); }
.domain-search-form button { padding: 0 26px; border-radius: 12px; }
.ds-hints { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.ds-hints button { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-muted); padding: 6px 14px; border-radius: 30px; font-size: 12px; cursor: pointer; transition: .2s; }
.ds-hints button:hover { color: var(--primary); border-color: var(--primary); }
@media(max-width: 480px) {
    .ds-title { font-size: 21px; }
    .domain-search-form { flex-direction: column; padding: 8px; border-radius: 16px; }
    .domain-search-form button { padding: 13px; width: 100%; }
}
@media(min-width: 993px) and (max-width: 1200px) {
    .hero h1 { font-size: 40px; }
}
@media(max-width: 360px) {
    .hero h1 { font-size: 23px; }
    .nav-actions .btn { padding: 9px 12px; font-size: 12px; }
}
