/* =========================================================
   VPN Persia — Main Stylesheet
   ========================================================= */

:root {
	--brand: #6C5CE7;
	--brand-dark: #341f97;
	--accent: #00cec9;
	--bg-dark: #0b0e1a;
	--bg-darker: #060811;
	--text-light: #f5f6fa;
	--text-muted: #a4a6b3;
	--card-bg: #12162b;
	--card-border: rgba(255,255,255,.08);
	--radius: 16px;
	--transition: all .3s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: 'Vazirmatn', Tahoma, sans-serif;
	background: var(--bg-dark);
	color: var(--text-light);
	direction: rtl;
	overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

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

.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 24px;
	border-radius: 50px;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	border: 2px solid transparent;
	transition: var(--transition);
	white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(108,92,231,.35); }
.btn-outline { border-color: rgba(255,255,255,.25); color: var(--text-light); background: transparent; }
.btn-outline:hover { border-color: var(--brand); background: rgba(108,92,231,.1); }
.btn-ghost { color: var(--text-light); background: rgba(255,255,255,.06); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-lg { padding: 16px 32px; font-size: 17px; }
.btn-block { width: 100%; }
.pulse-btn { animation: pulseBtn 2.4s infinite; }
@keyframes pulseBtn {
	0% { box-shadow: 0 0 0 0 rgba(108,92,231,.5); }
	70% { box-shadow: 0 0 0 14px rgba(108,92,231,0); }
	100% { box-shadow: 0 0 0 0 rgba(108,92,231,0); }
}

/* ---------- Preloader ---------- */
#vpn-preloader {
	position: fixed; inset: 0; z-index: 9999; background: var(--bg-dark);
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
	transition: opacity .5s ease, visibility .5s ease;
}
#vpn-preloader.loaded { opacity: 0; visibility: hidden; }
.preloader-shield { font-size: 48px; animation: preloaderPulse 1.2s ease-in-out infinite; }
@keyframes preloaderPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.preloader-bar { width: 160px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.preloader-bar-fill { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--brand), var(--accent)); animation: preloaderSlide 1.1s ease-in-out infinite; border-radius: 4px; }
@keyframes preloaderSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(350%); } }

/* ---------- Scroll progress bar ---------- */
#scroll-progress { position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 1001; background: transparent; }
#scroll-progress-fill { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .1s ease-out; }

/* ---------- Cursor glow (desktop only, decorative) ---------- */
#cursor-glow {
	position: fixed; width: 260px; height: 260px; border-radius: 50%; pointer-events: none; z-index: 1;
	background: radial-gradient(circle, rgba(108,92,231,.18), transparent 70%);
	transform: translate(-50%, -50%); left: -300px; top: -300px;
	transition: left .12s linear, top .12s linear; display: none;
}
@media (hover: hover) and (pointer: fine) { #cursor-glow { display: block; } }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: rgba(11,14,26,.75);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--card-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 20px; }
.site-logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; }
.logo-shield { font-size: 24px; }
.nav-menu { display: flex; gap: 28px; }
.nav-menu a { font-weight: 600; color: var(--text-muted); transition: var(--transition); position: relative; }
.nav-menu a:hover { color: var(--text-light); }
.nav-menu a::after {
	content: ''; position: absolute; right: 0; bottom: -6px; width: 0; height: 2px;
	background: var(--brand); transition: width .25s ease;
}
.nav-menu a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--text-light); border-radius: 2px; transition: var(--transition); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 130px 0 90px; overflow: hidden; text-align: center; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.blob-1 { width: 420px; height: 420px; background: var(--brand); top: -120px; right: -80px; animation: floatBlob 10s ease-in-out infinite; }
.blob-2 { width: 360px; height: 360px; background: var(--accent); bottom: -100px; left: -60px; animation: floatBlob 12s ease-in-out infinite reverse; }
.blob-3 { width: 260px; height: 260px; background: var(--brand-dark); top: 30%; left: 40%; animation: floatBlob 14s ease-in-out infinite; }
@keyframes floatBlob {
	0%, 100% { transform: translate(0,0) scale(1); }
	50% { transform: translate(30px,-40px) scale(1.1); }
}
.particles { position: absolute; inset: 0; }

.hero-inner { position: relative; z-index: 1; }
.hero-title {
	font-size: clamp(32px, 5vw, 56px);
	font-weight: 800;
	line-height: 1.35;
	margin: 0 0 18px;
	background: linear-gradient(135deg, #fff, var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 18px; color: var(--text-muted); max-width: 640px; margin: 0 auto 34px; line-height: 1.9; }
.hero-rotator { font-size: 16px; color: var(--text-muted); margin: -14px 0 30px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.rotator-word {
	display: inline-block; font-weight: 800; color: var(--accent);
	background: rgba(0,206,201,.1); padding: 4px 14px; border-radius: 50px;
	min-width: 140px; transition: opacity .25s ease, transform .25s ease;
}
.rotator-word.swap { opacity: 0; transform: translateY(6px); }

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }

.hero-stats { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; }
.stat-box { text-align: center; }
.stat-number, .stat-suffix { font-size: 34px; font-weight: 800; color: var(--accent); }
.stat-box p { color: var(--text-muted); margin: 4px 0 0; font-size: 14px; }

.hero-scroll-cue { display: flex; justify-content: center; margin-top: 40px; }
.hero-scroll-cue span {
	width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.3); border-radius: 20px; position: relative; display: block;
}
.hero-scroll-cue span::before {
	content: ''; position: absolute; top: 8px; right: 50%; transform: translateX(50%);
	width: 4px; height: 8px; background: var(--accent); border-radius: 2px; animation: scrollCue 1.6s infinite;
}
@keyframes scrollCue { 0% { top: 8px; opacity: 1; } 70% { top: 22px; opacity: 0; } 100% { top: 8px; opacity: 0; } }

/* ---------- Sections ---------- */
.section-title { text-align: center; font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: var(--text-muted); margin-bottom: 50px; font-size: 16px; }

.features, .plans, .faq { padding: 90px 0; }
.features { background: var(--bg-darker); }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature-card {
	background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius);
	padding: 32px 24px; text-align: center; transition: var(--transition);
}
.feature-card:hover { transform: translateY(-8px); border-color: var(--brand); box-shadow: 0 18px 40px rgba(108,92,231,.18); }
.feature-icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { margin: 0 0 10px; font-size: 19px; }
.feature-card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.8; margin: 0; }

/* ---------- Plans ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 26px; }
.plan-card {
	position: relative; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius);
	padding: 34px 26px; text-align: center; transition: var(--transition);
}
.plan-card:hover { transform: translateY(-8px); }
.plan-highlight { border: 2px solid var(--brand); background: linear-gradient(180deg, rgba(108,92,231,.12), var(--card-bg)); }
.plan-badge {
	position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
	background: linear-gradient(135deg, var(--brand), var(--accent)); padding: 5px 18px; border-radius: 50px; font-size: 12.5px; font-weight: 700;
}
.plan-name { font-size: 20px; margin: 8px 0 18px; }
.plan-price { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.plan-old-price { text-decoration: line-through; color: var(--text-muted); font-size: 15px; margin-left: 6px; }
.plan-amount { font-size: 36px; font-weight: 800; color: var(--accent); }
.plan-currency { font-size: 14px; color: var(--text-muted); }
.plan-period { color: var(--text-muted); font-size: 13.5px; margin: 4px 0 22px; }
.plan-features { text-align: right; margin-bottom: 26px; }
.plan-features li { padding: 6px 0; font-size: 14.5px; color: var(--text-light); border-bottom: 1px dashed var(--card-border); }
.plan-features li:last-child { border-bottom: none; }
.plans-empty { text-align: center; color: var(--text-muted); padding: 40px; border: 1px dashed var(--card-border); border-radius: var(--radius); }

/* ---------- Testimonials ---------- */
.testimonials { padding: 90px 0; background: var(--bg-darker); }
.testimonial-slider { max-width: 640px; margin: 0 auto; position: relative; }
.testimonial-track { display: flex; transition: transform .5s cubic-bezier(.25,.8,.25,1); }
.testimonial-card {
	flex: 0 0 100%; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius);
	padding: 40px 30px; text-align: center; direction: rtl;
}
.testimonial-avatar {
	width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--brand), var(--accent)); font-weight: 800; font-size: 22px;
}
.testimonial-text { font-size: 16.5px; line-height: 2; color: var(--text-light); margin-bottom: 16px; }
.testimonial-name { font-weight: 700; color: var(--accent); margin: 0 0 6px; }
.testimonial-stars { font-size: 14px; }
.testimonial-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.testimonial-dots span {
	width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.2); cursor: pointer; transition: var(--transition);
}
.testimonial-dots span.active { background: var(--brand); width: 24px; border-radius: 6px; }

/* ---------- Contact form ---------- */
.contact-section { padding: 90px 0; }
.contact-form { max-width: 640px; margin: 0 auto; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 36px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.contact-field label { font-size: 13.5px; color: var(--text-muted); }
.contact-field input, .contact-form textarea {
	background: rgba(255,255,255,.05); border: 1px solid var(--card-border); border-radius: 10px;
	padding: 12px 14px; color: var(--text-light); font-family: inherit; resize: vertical; transition: var(--transition);
}
.contact-field input:focus, .contact-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108,92,231,.2); }
#contact-submit-btn { width: 100%; margin-top: 6px; position: relative; }
.btn-spinner {
	width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%;
	animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.contact-response { text-align: center; margin-top: 14px; font-size: 14px; min-height: 20px; }
.contact-response.success { color: #55efc4; }
.contact-response.error { color: #ff7675; }

@media (max-width: 600px) {
	.contact-row { grid-template-columns: 1fr; }
}

/* ---------- Dashboard page ---------- */
.dashboard-page { padding: 60px 0 100px; }
.dashboard-header { display: flex; align-items: center; gap: 18px; margin-bottom: 40px; }
.dashboard-avatar {
	width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--accent));
	display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800;
}
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.dash-card {
	background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 26px;
	transition: var(--transition);
}
.dash-card:hover { transform: translateY(-6px); border-color: var(--brand); }
.dash-card h3 { margin: 0 0 10px; font-size: 16.5px; display: flex; align-items: center; gap: 8px; }
.dash-card p { color: var(--text-muted); font-size: 14px; margin: 0; line-height: 1.8; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 50px; font-size: 13px; font-weight: 700; }
.status-active { background: rgba(85,239,196,.12); color: #55efc4; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #55efc4; animation: statusPulse 1.6s infinite; }
@keyframes statusPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--card-border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; background: var(--card-bg); }
.faq-question {
	width: 100%; display: flex; justify-content: space-between; align-items: center;
	background: none; border: none; color: var(--text-light); font-family: inherit;
	padding: 18px 22px; font-size: 15.5px; font-weight: 700; cursor: pointer;
}
.faq-icon { font-size: 20px; transition: transform .3s ease; color: var(--accent); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; padding: 0 22px; }
.faq-item.open .faq-answer { max-height: 220px; padding: 0 22px 20px; }
.faq-answer p { margin: 0; color: var(--text-muted); line-height: 1.9; font-size: 14.5px; }

/* ---------- CTA ---------- */
.cta-final {
	text-align: center; padding: 90px 20px; background: linear-gradient(135deg, var(--brand), var(--brand-dark));
	border-radius: 28px; margin: 0 20px 90px; max-width: 1140px; margin-inline: auto;
}
.cta-final h2 { font-size: clamp(24px, 4vw, 34px); margin: 0 0 12px; }
.cta-final p { color: rgba(255,255,255,.85); margin-bottom: 30px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-darker); padding: 70px 0 20px; border-top: 1px solid var(--card-border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col p { color: var(--text-muted); line-height: 1.9; font-size: 14.5px; }
.footer-col h4 { margin-bottom: 16px; }
.social-links { display: flex; gap: 14px; margin-top: 14px; }
.social-links a { background: rgba(255,255,255,.06); padding: 8px 14px; border-radius: 50px; font-size: 13.5px; transition: var(--transition); }
.social-links a:hover { background: var(--brand); }
.footer-menu li, .footer-widget { margin-bottom: 10px; color: var(--text-muted); font-size: 14.5px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--card-border); color: var(--text-muted); font-size: 13.5px; }

.scroll-top {
	position: fixed; bottom: 24px; left: 24px; width: 46px; height: 46px; border-radius: 50%;
	background: var(--brand); display: flex; align-items: center; justify-content: center;
	font-size: 20px; opacity: 0; pointer-events: none; transition: var(--transition); z-index: 500;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-4px); }

/* ---------- Auth / Login page ---------- */
.auth-page { position: relative; min-height: 90vh; display: flex; align-items: center; justify-content: center; padding: 80px 20px; overflow: hidden; }
.auth-bg { position: absolute; inset: 0; z-index: 0; }
.auth-card {
	position: relative; z-index: 1; background: var(--card-bg); border: 1px solid var(--card-border);
	border-radius: 22px; padding: 36px 30px; width: 100%; max-width: 420px; box-shadow: 0 30px 60px rgba(0,0,0,.4);
}
.auth-tabs { display: flex; margin-bottom: 26px; background: rgba(255,255,255,.05); border-radius: 50px; padding: 4px; }
.auth-tab { flex: 1; padding: 10px; border: none; background: none; color: var(--text-muted); font-family: inherit; font-weight: 700; border-radius: 50px; cursor: pointer; transition: var(--transition); }
.auth-tab.active { background: var(--brand); color: #fff; }
.auth-form { display: none; flex-direction: column; gap: 6px; animation: fadeIn .4s ease; }
.auth-form.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.auth-form label { font-size: 13.5px; color: var(--text-muted); margin-top: 10px; }
.auth-form input {
	background: rgba(255,255,255,.05); border: 1px solid var(--card-border); border-radius: 10px;
	padding: 12px 14px; color: var(--text-light); font-family: inherit; transition: var(--transition);
}
.auth-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(108,92,231,.2); }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin: 14px 0 18px; color: var(--text-muted); }
.auth-row a:hover { color: var(--accent); }
.auth-checkbox { display: flex; align-items: center; gap: 6px; }
.auth-error { color: #ff7675; background: rgba(255,118,117,.1); padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin: 8px 0 0; }
.auth-success { color: #55efc4; background: rgba(85,239,196,.1); padding: 10px 14px; border-radius: 10px; font-size: 13.5px; margin: 8px 0 0; }

/* ---------- AOS overrides ---------- */
[data-aos] { transition-timing-function: cubic-bezier(.25,.8,.25,1); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.nav-menu { position: fixed; inset: 70px 0 0 0; background: var(--bg-dark); flex-direction: column; align-items: center;
		padding-top: 40px; gap: 26px; transform: translateY(-120%); transition: transform .3s ease; z-index: 998; }
	.nav-menu.open { transform: translateY(0); }
	.menu-toggle { display: flex; }
	.footer-grid { grid-template-columns: 1fr; }
	.features-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.features-grid { grid-template-columns: 1fr; }
	.hero-stats { gap: 30px; }
	.header-actions .btn span { display: none; }
}
