* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

:root {
    --primary-blue: #1e40af;
    --light-blue: #3b82f6;
    --accent-blue: #60a5fa;
    --white: #ffffff;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #64748b;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--light-gray);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: hidden;
}

/* لودینگ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
    max-width: 300px;
}

.loader-brain {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    position: relative;
}

.loader-brain i {
    font-size: 3.5rem;
    color: #3b82f6;
    animation: brain-spin 2s linear infinite;
}

.loader-brain::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    animation: brain-pulse 1.5s ease-in-out infinite;
}

@keyframes brain-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes brain-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

.loader-text {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 5px;
}

.loader-subtext {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background-color: var(--medium-gray);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--light-blue), var(--primary-blue));
    border-radius: 5px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent);
    animation: progress-shimmer 1.5s infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percent {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.dot {
    width: 14px;
    height: 14px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    animation: loading-dots 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) {
    animation-delay: -0.32s;
}

.dot:nth-child(2) {
    animation-delay: -0.16s;
}

.dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loading-dots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* استایل‌های باقی مانده صفحه (همانند قبل) */
/* هدر */
header {
    background-color: var(--white);
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 100;
    height: 65px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.logo-icon {
    color: var(--primary-blue);
    font-size: 1.6rem;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.logo-subtext {
    font-size: 0.65rem;
    color: var(--dark-gray);
    margin-top: -4px;
}

.nav-buttons {
    display: flex;
    gap: 0.8rem;
}

.nav-btn {
    padding: 0.45rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    border: none;
}

.login-btn {
    background-color: var(--primary-blue);
    color: var(--white);
}

.login-btn:hover {
    background-color: #1e3a8a;
    transform: translateY(-2px);
}

.contact-btn {
    background-color: transparent;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.contact-btn:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* محتوای اصلی */
main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

main.loaded {
    opacity: 1;
    transform: translateY(0);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.platform-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.2rem;
    color: var(--dark-gray);
}

.platform-title span {
    color: var(--primary-blue);
    font-weight: 800;
}

.service-highlight {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
    padding: 0.9rem 1.2rem;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    display: inline-block;
    border-left: 5px solid var(--light-blue);
    box-shadow: var(--shadow);
    line-height: 1.4;
}

.hero-description {
    font-size: 1rem;
    color: var(--dark-gray);
    margin-bottom: 2.2rem;
    line-height: 1.7;
}

.hero-description strong {
    color: var(--primary-blue);
    font-weight: 700;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-bottom: 2.2rem;
}

.feature-card {
    background-color: var(--white);
    padding: 1.2rem 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    transition: var(--transition);
    border: 1px solid var(--medium-gray);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, var(--transition);
}

.feature-card.loaded {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:nth-child(1) { transition-delay: 0.1s; }
.feature-card:nth-child(2) { transition-delay: 0.2s; }
.feature-card:nth-child(3) { transition-delay: 0.3s; }
.feature-card:nth-child(4) { transition-delay: 0.4s; }

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.feature-icon {
    background: linear-gradient(135deg, var(--light-blue), var(--accent-blue));
    color: var(--white);
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.feature-text {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

.feature-desc {
    font-size: 0.8rem;
    color: var(--dark-gray);
    margin-top: 0.3rem;
    line-height: 1.4;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    color: var(--white);
    padding: 1rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 15px rgba(30, 64, 175, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    max-width: 450px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s, var(--transition);
}

.cta-button.loaded {
    opacity: 1;
    transform: translateY(0);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.3);
    background: linear-gradient(135deg, #1e3a8a, var(--primary-blue));
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 350px;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.hero-visual.loaded {
    opacity: 1;
    transform: translateX(0);
}

.ai-avatar-container {
    position: relative;
    width: 320px;
    height: 320px;
}

.avatar-circle {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue), var(--accent-blue));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* آیکون مغز مدرن */
.brain-container {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-main {
    font-size: 7rem;
    color: rgba(255, 255, 255, 0.98);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 2;
    animation: brain-float 6s infinite ease-in-out;
}

@keyframes brain-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.02); }
}

.brain-glow {
    position: absolute;
    width: 190px;
    height: 190px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    animation: pulse-glow 4s infinite alternate;
}

@keyframes pulse-glow {
    0% { opacity: 0.3; transform: scale(0.9); }
    100% { opacity: 0.6; transform: scale(1.1); }
}

.avatar-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    animation: ring-rotate 20s infinite linear;
}

@keyframes ring-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    background-color: var(--white);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.8rem;
    width: 160px;
    z-index: 10;
    font-weight: 600;
    color: var(--primary-blue);
    transition: var(--transition);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, var(--transition);
}

.floating-element.loaded {
    opacity: 1;
    transform: translateX(0);
}

.floating-element:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.element-1 {
    top: 8%;
    right: -20%;
    animation: float-1 9s infinite ease-in-out;
    transition-delay: 0.6s;
}

.element-2 {
    top: 50%;
    right: -25%;
    transform: translateY(-50%);
    animation: float-2 10s infinite ease-in-out;
    animation-delay: 1s;
    transition-delay: 0.7s;
}

.element-3 {
    bottom: 10%;
    right: -20%;
    animation: float-3 11s infinite ease-in-out;
    animation-delay: 2s;
    transition-delay: 0.8s;
}

@keyframes float-1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    50% { transform: translateY(-60%) rotate(-2deg); }
}

@keyframes float-3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* مدال‌ها */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--white);
    border-radius: 14px;
    width: 90%;
    max-width: 420px;
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease, max-width 0.3s ease;
}

.modal-content.wider {
    max-width: 550px;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.3rem 1.5rem 0;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--dark-gray);
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--primary-blue);
    background-color: rgba(59, 130, 246, 0.1);
}

/* تب‌های مدال ورود/ثبت‌نام */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--medium-gray);
    padding: 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.modal-tab {
    flex: 1;
    padding: 0.9rem;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark-gray);
    position: relative;
    z-index: 1;
}

.modal-tab.active {
    color: var(--primary-blue);
}

.tab-slider {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--light-blue), var(--primary-blue));
    border-radius: 3px 3px 0 0;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), width 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.modal-tab:hover {
    color: var(--primary-blue);
    background-color: rgba(59, 130, 246, 0.05);
}

.tab-content {
    display: none;
    padding: 1.5rem;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    background-color: var(--light-gray);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: var(--white);
}

/* استایل مخصوص فرم ثبت‌نام با چند ستونه */
.signup-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.signup-form-grid .form-group {
    margin-bottom: 0;
}

.full-width {
    grid-column: span 2;
}

.form-submit {
    background: linear-gradient(135deg, var(--primary-blue), var(--light-blue));
    color: var(--white);
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.2);
}

.form-submit:hover {
    background: linear-gradient(135deg, #1e3a8a, var(--primary-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(30, 64, 175, 0.3);
}

.switch-tab-link {
    text-align: center;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--medium-gray);
    font-size: 0.8rem;
}

.switch-tab-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
}

.switch-tab-btn:hover {
    background-color: rgba(59, 130, 246, 0.1);
    text-decoration: underline;
}

/* فوتر */
footer {
    background-color: var(--white);
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--medium-gray);
    height: 55px;
    font-size: 0.8rem;
    color: var(--dark-gray);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.8s, transform 0.5s ease 0.8s;
}

footer.loaded {
    opacity: 1;
    transform: translateY(0);
}

.footer-links {
    display: flex;
    gap: 1.2rem;
}

.footer-link {
    color: var(--dark-gray);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-link:hover {
    color: var(--primary-blue);
}

.copyright {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-text{
    color:red;
    font-size:12px;
}
/* ریسپانسیو */
@media (max-width: 1024px) {
    .hero-container {
        gap: 1.5rem;
    }

    .ai-avatar-container {
        width: 280px;
        height: 280px;
    }

    .brain-container {
        width: 140px;
        height: 140px;
    }

    .brain-main {
        font-size: 6rem;
    }

    .floating-element {
        width: 140px;
        font-size: 0.75rem;
    }

    .element-1, .element-3 {
        right: -15%;
    }

    .element-2 {
        right: -20%;
    }

    .error-text{
        color:red;
        font-size:12px;
    }
}

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding-top: 1rem;
    }

    .hero-description, .platform-title, .service-highlight {
        max-width: 100%;
    }

    .features-grid {
        justify-content: center;
        max-width: 500px;
        margin: 0 auto 2.2rem;
    }

    .ai-avatar-container {
        width: 260px;
        height: 260px;
    }

    .brain-main {
        font-size: 5.5rem;
    }

    .brain-container {
        width: 130px;
        height: 130px;
    }

    .floating-element {
        width: 130px;
        font-size: 0.7rem;
        padding: 0.7rem 0.9rem;
    }

    .error-text{
        color:red;
        font-size:12px;
    }
}

@media (max-width: 768px) {
    .platform-title {
        font-size: 1.6rem;
    }

    .service-highlight {
        font-size: 1.5rem;
        padding: 0.8rem 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nav-buttons {
        gap: 0.5rem;
    }

    .nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    header, main, footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .modal-header, .modal-tabs {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    .tab-content {
        padding: 1.2rem;
    }

    .modal-content.wider {
        max-width: 450px;
    }

    .signup-form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }

    .floating-element {
        width: 120px;
        font-size: 0.65rem;
        padding: 0.6rem 0.8rem;
    }

    .element-1, .element-3 {
        right: -10%;
    }

    .element-2 {
        right: -15%;
    }

    .error-text{
        color:red;
        font-size:12px;
    }
}

@media (max-width: 480px) {
    .platform-title {
        font-size: 1.4rem;
    }

    .service-highlight {
        font-size: 1.3rem;
        padding: 0.7rem 0.9rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .ai-avatar-container {
        width: 220px;
        height: 220px;
    }

    .brain-main {
        font-size: 5rem;
    }

    .brain-container {
        width: 110px;
        height: 110px;
    }

    .floating-element {
        width: 100px;
        padding: 0.5rem 0.7rem;
        font-size: 0.6rem;
    }

    .element-1, .element-2, .element-3 {
        display: none;
    }

    .footer-links {
        gap: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    footer {
        flex-direction: column;
        gap: 0.5rem;
        height: auto;
        padding: 0.8rem;
    }

    .modal-content {
        width: 95%;
        max-width: 95%;
    }

    /*.error-text{*/
    /*    color:red;*/
    /*    font-size:12px;*/
    /*}*/

    .error-text {
        color: #dc3545;
        font-size: 12px;
        margin-top: 5px;
        display: none;
        direction: rtl;
    }

    .error-input {
        border-color: #dc3545 !important;
        box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    }
}
