/* تنظیمات کلی و فونت */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
    background-color: #0a0a0a; 
}

/* --------------------------------- */
/* بخش ۱: پس‌زمینه و گرادینت */
/* --------------------------------- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, #000000, #141414, #2c3e50, #000000); 
    background-size: 400% 400%;
    animation: gradientBG 12s ease infinite;
    z-index: -2;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --------------------------------- */
/* بخش ۲: ذرات معلق (Particles) - تغییرات اصلی اینجا اعمال شده است */
/* --------------------------------- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    /* این پارامتر برای جلوگیری از قطع شدن ذرات در کناره‌ها مهم است */
    perspective: 1000px; 
}

.particles div {
    position: absolute;
    display: block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3); /* کاهش شفافیت برای حس دوری بیشتر */
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.4); 
    
    /* تنظیمات انیمیشن جدید: حرکت آرام و چرخشی */
    animation: floatingParticles linear infinite;
}

/* تعریف موقعیت‌های اولیه و سرعت‌های متفاوت برای ذرات */
.particles div:nth-child(1) { left: 25%; top: 20%; width: 12px; height: 12px; animation-duration: 20s; animation-delay: 0s; }
.particles div:nth-child(2) { left: 10%; top: 50%; width: 18px; height: 18px; animation-duration: 25s; animation-delay: 2s; }
.particles div:nth-child(3) { left: 70%; top: 80%; width: 9px; height: 9px; animation-duration: 30s; animation-delay: 4s; }
.particles div:nth-child(4) { left: 40%; top: 10%; width: 22px; height: 22px; animation-duration: 22s; animation-delay: 0s; }
.particles div:nth-child(5) { left: 65%; top: 60%; width: 15px; height: 15px; animation-duration: 18s; animation-delay: 1.5s; }
.particles div:nth-child(6) { left: 75%; top: 30%; width: 28px; height: 28px; animation-duration: 35s; animation-delay: 5s; }
.particles div:nth-child(7) { left: 35%; top: 90%; width: 16px; height: 16px; animation-duration: 28s; animation-delay: 7s; }
.particles div:nth-child(8) { left: 50%; top: 40%; width: 13px; height: 13px; animation-duration: 19s; animation-delay: 10s; }
.particles div:nth-child(9) { left: 60%; top: 75%; width: 20px; height: 20px; animation-duration: 24s; animation-delay: 3s; }
.particles div:nth-child(10) { left: 85%; top: 15%; width: 10px; height: 10px; animation-duration: 26s; animation-delay: 6s; }


/* تعریف فریم‌های کلیدی انیمیشن جدید: حرکت آرام و نامحدود در یک محدوده */
@keyframes floatingParticles {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, -50px) rotate(45deg);
    }
    50% {
        transform: translate(0, 50px) rotate(180deg);
    }
    75% {
        transform: translate(-50px, -50px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}


/* --------------------------------- */
/* بخش ۳: کانتینر اصلی و کارت‌ها */
/* --------------------------------- */
.container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 3rem 2rem;
    width: 90%;
    max-width: 650px; 
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: fadeIn 1s ease-out;
    z-index: 1; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header { margin-bottom: 2.5rem; }

.logo i {
    font-size: 3.5rem;
    color: #4A90E2; 
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(74, 144, 226, 0.7);
    transition: color 0.3s;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

header p {
    color: #bbb;
    font-size: 0.95rem;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.service-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.service-card:hover {
    background: rgba(74, 144, 226, 0.2); 
    transform: translateY(-8px);
    border-color: rgba(74, 144, 226, 0.5);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.service-card i {
    font-size: 2.2rem;
    color: #4A90E2; 
    margin-bottom: 5px;
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
}

.service-card span {
    font-size: 0.85rem;
    color: #ccc;
    text-align: center;
}

footer {
    margin-top: 3.5rem;
    font-size: 0.75rem;
    color: #555;
    transition: color 0.3s;
}

/* --------------------------------- */
/* بخش ۴: پاپ‌آپ شمارش معکوس و انیمیشن */
/* --------------------------------- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hidden {
    display: none !important;
    opacity: 0 !important;
}

.modal {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal p {
    font-size: 1rem;
    margin-top: 20px;
    color: #bbb;
}

.countdown-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    background: conic-gradient(rgba(74, 144, 226, 0.5) 0deg, rgba(74, 144, 226, 0) 360deg);
}

.countdown-circle h2 {
    font-size: 3.5rem;
    font-weight: 900;
    z-index: 2;
    background: -webkit-linear-gradient(#fff, #999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.countdown-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#4A90E2 0deg, #1c2730 0deg);
    mask: radial-gradient(transparent 50px, #000 55px); 
    -webkit-mask: radial-gradient(transparent 50px, #000 55px);
    transform: rotate(-90deg);
}

@keyframes countdown-fill {
    0% {
        background: conic-gradient(#4A90E2 0deg, #1c2730 0deg);
    }
    100% {
        background: conic-gradient(#4A90E2 360deg, #1c2730 360deg);
    }
}

/* ریسپانسیو برای موبایل */
@media (max-width: 600px) {
    .container {
        padding: 2rem 1rem;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .service-card {
        padding: 1rem;
    }
}
