/* --- تنظیمات پایه --- */
:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --success: #06d6a0;
    --dark-bg: #0b0c15;
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-main: #ffffff;
    --text-muted: #b8b8d4;
    --glass-border: rgba(255, 255, 255, 0.08);
    --gradient-main: linear-gradient(135deg, #4361ee 0%, #7209b7 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: var(--dark-bg) !important;
    background: var(--dark-bg) !important;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- اسکرول بار --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 4px; }

/* --- هدر --- */
header {
    position: fixed; top: 0; width: 100%; padding: 1rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: 0.4s;
    background: rgba(11, 12, 21, 0.7); backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
}
header.scrolled { padding: 0.8rem 5%; background: rgba(11, 12, 21, 0.95); border-bottom: 1px solid var(--glass-border); }

.logo { font-size: 1.4rem; font-weight: 900; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.logo i { color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }

.header-actions { display: flex; gap: 15px; align-items: center; }
.login-trigger {
    background: transparent; border: 1px solid var(--accent); color: var(--accent);
    padding: 0.5rem 1.2rem; border-radius: 8px; cursor: pointer; transition: 0.3s; font-weight: bold;
}
.login-trigger:hover { background: var(--accent); color: #000; }

.cta-btn {
    background: var(--gradient-main); color: white; padding: 0.7rem 1.5rem;
    border: none; border-radius: 50px; font-weight: bold; cursor: pointer; transition: 0.3s;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(67, 97, 238, 0.5); }
.full-width { width: 100%; }

.outline-btn {
    background: transparent; border: 1px solid var(--text-muted); color: var(--text-main);
    padding: 0.7rem 1.5rem; border-radius: 50px; cursor: pointer; transition: 0.3s;
}
.outline-btn:hover { border-color: var(--text-main); background: rgba(255,255,255,0.1); }

/* --- صفحه ورود (Login Overlay) --- */
.login-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(8px);
    z-index: 2000; display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.4s;
}
.login-overlay.active { opacity: 1; visibility: visible; }

.login-container {
    background: #151621; width: 90%; max-width: 400px; padding: 2.5rem;
    border-radius: 20px; border: 1px solid var(--glass-border);
    position: relative; text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.close-login { position: absolute; top: 15px; left: 15px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.2rem; }
.login-header h2 { margin: 1rem 0 0.5rem; }
.login-header p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 2rem; }
.input-group {
    position: relative; margin-bottom: 1.5rem; text-align: right;
}
.input-group i {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
}
.input-group input {
    width: 100%; padding: 12px 45px 12px 15px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    border-radius: 10px; color: white; font-family: 'Vazirmatn';
    transition: 0.3s;
}
.input-group input:focus { border-color: var(--accent); background: rgba(255,255,255,0.1); }
.login-links { display: flex; justify-content: space-between; margin-top: 1.5rem; font-size: 0.8rem; }
.login-links a { color: var(--text-muted); }
.login-links a:hover { color: var(--accent); }

/* --- بخش Hero --- */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    justify-content: center; padding: 0 5%; overflow: hidden; text-align: center;
}
#hero-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.hero-content { position: relative; z-index: 2; max-width: 800px; opacity: 0; animation: fadeInUp 1s forwards 0.5s; }

/* --- اشکال شناور --- */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(76, 201, 240, 0.1);
    filter: blur(40px);
    animation: float 20s infinite ease-in-out;
    z-index: 1;
}
.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}
.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 15%;
    animation-delay: 5s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}
.badge {
    display: inline-block; padding: 0.5rem 1rem; background: rgba(76, 201, 240, 0.1);
    border: 1px solid var(--accent); color: var(--accent); border-radius: 30px; font-size: 0.8rem; margin-bottom: 1.5rem;
}
.hero h1 { font-size: 3rem; line-height: 1.3; margin-bottom: 1.5rem; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2.5rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; }

/* --- بخش‌ها --- */
.section { padding: 5rem 5%; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; margin-bottom: 0.5rem; }

/* --- تکنولوژی اختصاصی --- */
.tech-container {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px;
}
.tech-card {
    flex: 1; min-width: 250px; background: var(--card-bg); padding: 1.5rem;
    border-radius: 15px; border: 1px solid var(--glass-border); text-align: center;
    transition: 0.3s;
}
.tech-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.tech-card.highlight { border-color: var(--accent); background: rgba(76, 201, 240, 0.05); }
.tech-visual {
    height: 120px; border-radius: 10px; overflow: hidden; position: relative; margin-bottom: 1rem;
}
.tech-visual img { width: 100%; height: 100%; object-fit: cover; }
.tech-badge {
    position: absolute; top: 10px; right: 10px;
    background: var(--primary); width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 0.8rem;
}
.plus-icon, .equal-icon { font-size: 1.5rem; color: var(--text-muted); }
.equal-icon { animation: pulse 2s infinite; }

/* --- سازمانی --- */
.dashboard-preview { display: flex; flex-wrap: wrap; gap: 3rem; align-items: center; }
.dash-text { flex: 1; }
.feature-list li { margin-bottom: 15px; color: var(--text-muted); display: flex; gap: 10px; align-items: flex-start; }
.feature-list i { color: var(--success); margin-top: 5px; }
.dash-visual { flex: 1; perspective: 1000px; }
.dash-card {
    background: #1a1b2e; border-radius: 15px; overflow: hidden; border: 1px solid #2d2f45;
    transform: rotateY(-10deg) rotateX(5deg); transition: 0.5s;
}
.dash-card:hover { transform: rotateY(0) rotateX(0); }
.dash-img { width: 100%; display: block; }

/* --- مشاوره --- */
.consult-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.consult-card {
    background: var(--card-bg); padding: 2rem; border-radius: 20px; border: 1px solid var(--glass-border);
    display: flex; flex-direction: column; position: relative;
}
.consult-card.ai-border { border-color: var(--accent); box-shadow: 0 0 20px rgba(76, 201, 240, 0.1); }
.consult-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; }
.ai-border .consult-icon { color: var(--accent); }
.ai-chat-demo {
    background: rgba(0,0,0,0.3); padding: 10px; border-radius: 10px; margin: 1rem 0;
    font-size: 0.8rem; height: 120px; overflow: hidden;
}
.msg { padding: 8px; border-radius: 8px; margin-bottom: 5px; max-width: 90%; }
.msg.user { background: var(--primary); align-self: flex-start; color: white; }
.msg.bot { background: #2a2b3d; color: #ccc; align-self: flex-end; margin-right: auto; }

/* --- فروشگاه --- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.product-card {
    background: var(--card-bg); border-radius: 20px; overflow: hidden;
    border: 1px solid var(--glass-border); transition: 0.3s;
}
.product-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.prod-img { width: 100%; height: 180px; object-fit: cover; }
.product-info { padding: 1.5rem; }
.tag { font-size: 0.7rem; padding: 2px 8px; border-radius: 4px; background: #333; }
.tag.online { background: rgba(67, 97, 238, 0.2); color: var(--primary); }
.tag.offline { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
.price { float: left; font-weight: bold; color: var(--accent); }

/* --- همکاری در فروش --- */
.affiliate-content { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.aff-text { flex: 2; }
.aff-text ul { margin: 1.5rem 0; }
.aff-text li { margin-bottom: 10px; color: var(--text-muted); }
.aff-text li i { color: var(--success); margin-left: 10px; }
.aff-visual { flex: 1; text-align: center; font-size: 5rem; color: rgba(255,255,255,0.05); }

/* --- فوتر --- */
footer { background: #050508; padding: 3rem 5%; border-top: 1px solid var(--glass-border); margin-top: 5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); padding-right: 5px; }
.copyright { text-align: center; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #1a1a2e; color: #555; font-size: 0.8rem; }

/* --- انیمیشن‌ها --- */
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Toast --- */
.toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white; padding: 10px 20px; border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 3000;
    opacity: 0; transition: 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; bottom: 40px; }

/* --- ریسپانسیو --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 75%; height: 100vh;
        background: #0b0c15; flex-direction: column; justify-content: center;
        z-index: 999; transition: 0.4s; border-left: 1px solid var(--glass-border);
    }
    .nav-links.active { right: 0; }
    .menu-toggle { display: block; font-size: 1.5rem; cursor: pointer; }
    .hero h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; }
    .tech-container { flex-direction: column; }
    .plus-icon, .equal-icon { transform: rotate(90deg); margin: 10px 0; }
    .tech-card { width: 100%; }
    .dashboard-preview { flex-direction: column; }
}