/* =========================================================
   BDSChat — Index Page Styles
   File: css/index.css
   Description: استایل صفحه خوش‌آمدگویی + Splash Loader
   Depends on: base.css (متغیرها و reset)
   ========================================================= */

/* =========================================================
   BODY (Centered layout)
   ========================================================= */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 32px;
}

/* =========================================================
   SPLASH / LOADING OVERLAY
   ========================================================= */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: var(--z-toast);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

    .loading-overlay.hide {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

.loading-logo-icon {
    background-color: var(--primary);
    color: #ffffff;
    width: 90px;
    height: 90px;
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    font-weight: 800;
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.35);
    animation: splashPulse 2s ease-in-out infinite;
}

.loading-logo-text {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

    .loading-logo-text span {
        color: var(--primary);
    }

.loading-bar {
    margin-top: 20px;
    width: 60px;
    height: 4px;
    background-color: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

    .loading-bar::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 40%;
        background-color: var(--primary);
        border-radius: var(--radius-full);
        animation: loadingSlide 1.5s ease-in-out infinite;
    }

@keyframes splashPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 15px 35px rgba(79, 70, 229, 0.35);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 20px 45px rgba(79, 70, 229, 0.5);
    }
}

@keyframes loadingSlide {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

/* =========================================================
   AUTH CONTAINER
   ========================================================= */
.auth-container {
    background-color: var(--bg-card);
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    overflow: hidden;
    min-height: 600px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

    .auth-container.show {
        opacity: 1;
    }

/* =========================================================
   FORM SIDE
   ========================================================= */
.form-side {
    flex: 1;
    padding: 48px 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* =========================================================
   IMAGE SIDE
   ========================================================= */
.image-side {
    flex: 1;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e7ff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px;
    position: relative;
    overflow: hidden;
}

    .image-side img {
        max-width: 90%;
        height: auto;
        object-fit: contain;
        z-index: 2;
        position: relative;
    }

    .image-side::before,
    .image-side::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        background: rgba(79, 70, 229, 0.05);
    }

    .image-side::before {
        width: 300px;
        height: 300px;
        top: -80px;
        right: -80px;
    }

    .image-side::after {
        width: 220px;
        height: 220px;
        bottom: -60px;
        left: -60px;
    }

/* =========================================================
   LOGO
   ========================================================= */
.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.logo-icon {
    background-color: var(--primary);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    box-shadow: var(--shadow-primary);
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* =========================================================
   TITLES
   ========================================================= */
.form-side h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-dark);
    text-align: center;
}

.form-side .subtitle {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 32px;
    text-align: center;
    line-height: 1.8;
}

/* =========================================================
   GUEST BUTTONS
   ========================================================= */
.guest-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-bottom: 32px;
}

    .guest-buttons .btn {
        flex: 1;
        margin-bottom: 0;
    }

/* =========================================================
   GUEST FEATURES
   ========================================================= */
.guest-features {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 8px;
    gap: 12px;
}

.feature-icon-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 0.8rem;
    flex: 1;
    text-align: center;
}

    .feature-icon-small svg {
        color: var(--primary);
        background-color: var(--primary-light);
        padding: 8px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
    }

/* =========================================================
   RESPONSIVE — Tablet
   ========================================================= */
@media (max-width: 900px) {
    body {
        padding: 16px;
    }

    .auth-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }

    .image-side {
        display: none;
    }

    .form-side {
        padding: 32px 24px;
    }
}

/* =========================================================
   RESPONSIVE — Mobile
   ========================================================= */
@media (max-width: 600px) {
    body {
        padding: 8px;
    }

    .auth-container {
        border-radius: var(--radius-lg);
    }

    .form-side {
        padding: 24px 18px;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 10px;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-section {
        margin-bottom: 16px;
        gap: 10px;
    }

    .form-side h2 {
        font-size: 1.35rem;
        margin-bottom: 8px;
    }

    .form-side .subtitle {
        font-size: 0.82rem;
        margin-bottom: 22px;
        line-height: 1.6;
    }

    .guest-buttons {
        gap: 8px;
        margin-bottom: 22px;
    }

        .guest-buttons .btn {
            font-size: 0.85rem;
            padding: 0 12px;
        }

    .guest-features {
        padding-top: 16px;
        gap: 8px;
    }

    .feature-icon-small {
        font-size: 0.7rem;
        gap: 5px;
    }

        .feature-icon-small svg {
            width: 32px;
            height: 32px;
            padding: 6px;
        }

    /* Splash موبایل */
    .loading-logo-icon {
        width: 75px;
        height: 75px;
        font-size: 40px;
        border-radius: 20px;
    }

    .loading-logo-text {
        font-size: 26px;
    }
}
