/* Reset و پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    color: #2c3e50;
    min-height: 100vh;
    direction: rtl;
    line-height: 1.6;
}

/* کانتینر مرکزی */
.container, .form-container, .admin-container, .news-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

/* هدر */
header {
    background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 1.8rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

header h1 {
    font-size: 2.1rem;
    margin: 0;
    letter-spacing: 0.5px;
}

.user-info {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
}

.user-info a {
    color: #e0f2fe;
    text-decoration: none;
    margin-right: 12px;
    transition: color 0.2s;
}

.user-info a:hover {
    color: white;
}

/* فرم‌ها (ورود + ثبت‌نام + ادمین) */
.form-container, .login-box {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    max-width: 420px;
    margin: 80px auto 40px;
}

.form-container h2, .login-box h2 {
    text-align: center;
    color: #1e40af;
    margin-bottom: 1.8rem;
    font-size: 1.65rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
    display: block;
}

input, textarea {
    padding: 0.9rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

button {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 0.95rem;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 0.5rem;
}

button:hover {
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

/* پیام‌ها */
.error {
    color: #dc2626;
    background: #fee2e2;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
}

.message.success {
    background: #ecfdf5;
    color: #065f46;
    padding: 1rem;
    border-radius: 10px;
    margin: 1.2rem 0;
    text-align: center;
    border-right: 4px solid #10b981;
}

/* اخبار */
.news-section h2 {
    color: #1e40af;
    text-align: center;
    margin-bottom: 1.8rem;
    font-size: 1.7rem;
    position: relative;
}

.news-section h2::after {
    content: '';
    width: 80px;
    height: 3px;
    background: #3b82f6;
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
}

ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

li {
    background: white;
    padding: 1.4rem 1.6rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

li:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.news-date {
    color: #6b7280;
    font-size: 0.92rem;
    margin-right: 0.8rem;
}

/* پنل ادمین */
.admin-container h2 {
    color: #1e40af;
    margin: 2rem 0 1.2rem;
}

.logout {
    position: absolute;
    left: 20px;
    top: 1.6rem;
    font-size: 0.95rem;
}

.logout a {
    color: white;
    text-decoration: none;
}

.logout a:hover {
    text-decoration: underline;
}

/* فوتر */
footer {
    background: #1f2937;
    color: #d1d5db;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.support h3 {
    color: #60a5fa;
    margin-bottom: 0.6rem;
}

.support strong {
    color: #facc15;
    font-size: 1.2rem;
}

footer a {
    color: #93c5fd;
    text-decoration: none;
}

footer a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* ریسپانسیو */
@media (max-width: 600px) {
    .form-container, .login-box {
        margin: 40px 15px;
        padding: 1.8rem 1.4rem;
    }
    
    header h1 {
        font-size: 1.7rem;
    }
}
/* Particles + Hero */
#particles-js {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: #0a0e17; /* پس‌زمینه تیره برای ذرات بهتر دیده بشن */
}

.hero {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 15vh 2rem 8rem;
    background: rgba(0,0,0,0.4); /* نیمه‌شفاف برای خوانایی */
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.typed-text {
    color: #00ffea;
    font-weight: bold;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(10, 14, 23, 0.6);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    z-index: 100;
    transition: all 0.4s;
}

.navbar.scrolled {
    background: rgba(10, 14, 23, 0.95);
    padding: 0.8rem 2rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo { font-size: 1.6rem; font-weight: bold; color: #00ffea; }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover { color: #00ffea; }

#mobile-menu {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%; right: 0;
        background: #0a0e17;
        width: 100%;
        padding: 1rem;
    }
    .nav-links.active { display: flex; }
    #mobile-menu { display: block; }
}