﻿/* =========================================================
   Ultra-Premium Form Tracking Design (Next-Gen UI)
   ========================================================= */

.custom-form-wrapper {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    max-width: 440px;
    margin: 60px auto;
    padding: 50px 40px;
    border-radius: 32px;
    /* سایه چندلایه‌ی سه‌بعدی و بازتاب نور داخلی */
    box-shadow: 0 30px 60px -12px rgba(99, 102, 241, 0.15), 0 18px 36px -18px rgba(0, 0, 0, 0.1), inset 0 2px 4px rgba(255, 255, 255, 0.9), inset 0 -2px 4px rgba(0, 0, 0, 0.02);
    font-family: 'Vazir', 'IRANSans', Tahoma, Arial, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    animation: formFadeInScale 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

    /* نوار درخشان بالای فرم با افکت نئونی */
    .custom-form-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 6px;
        background: linear-gradient(90deg, #6366f1, #ec4899, #8b5cf6, #6366f1);
        background-size: 300% 100%;
        animation: gradientGlow 4s linear infinite;
        box-shadow: 0 2px 15px rgba(236, 72, 153, 0.4);
    }

.custom-logo {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

    .custom-logo img {
        width: 75px;
        height: 75px;
        border-radius: 24px;
        object-fit: cover;
        box-shadow: 0 15px 35px -5px rgba(99, 102, 241, 0.3);
        border: 4px solid #ffffff;
        background: linear-gradient(135deg, #f8fafc, #e2e8f0);
        padding: 6px;
        transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        animation: floatIcon 6s ease-in-out infinite;
    }

        .custom-logo img:hover {
            transform: scale(1.15) rotate(8deg);
            box-shadow: 0 20px 40px -5px rgba(99, 102, 241, 0.5);
        }

.custom-title {
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 12px 0;
    letter-spacing: -1px;
}

.custom-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 40px;
    line-height: 1.6;
    font-weight: 500;
}

.custom-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* فیلدهای ورودی پیشرفته */
.custom-input-group {
    position: relative;
}

.custom-input {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 15px;
    color: #1e293b;
    outline: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(248, 250, 252, 0.7);
    box-sizing: border-box;
    font-weight: 600;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

    .custom-input.text-left {
        text-align: left;
        letter-spacing: 2px;
    }

    .custom-input:hover {
        background-color: #ffffff;
        border-color: #cbd5e1;
    }

    .custom-input:focus {
        border-color: transparent;
        background-color: #ffffff;
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 10px 20px -10px rgba(99, 102, 241, 0.2);
        /* پس‌زمینه گرادیانت برای بردر در حالت فوکوس */
        background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #6366f1, #ec4899);
        background-origin: border-box;
        background-clip: padding-box, border-box;
    }

.custom-label {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: 600;
}

/* انیمیشن هوشمند و نرم لیبل‌ها */
.custom-input:focus ~ .custom-label,
.custom-input:not(:placeholder-shown) ~ .custom-label {
    top: -2px;
    right: 15px;
    font-size: 13px;
    color: #ec4899;
    background: #ffffff;
    padding: 0 10px;
    border-radius: 8px;
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* دکمه با طراحی چشم‌گیر و زنده */
.custom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    background-size: 200% auto;
    color: white;
    border: none;
    padding: 20px;
    border-radius: 20px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-top: 10px;
    box-shadow: 0 12px 24px -8px rgba(139, 92, 246, 0.5);
    position: relative;
    overflow: hidden;
}

    .custom-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 32px -8px rgba(139, 92, 246, 0.7);
        background-position: right center;
    }

    .custom-btn:active {
        transform: translateY(2px) scale(0.98);
        box-shadow: 0 8px 16px -8px rgba(139, 92, 246, 0.5);
    }

    .custom-btn svg {
        transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .custom-btn:hover svg {
        transform: translateX(-6px) scale(1.1);
    }

/* انیمیشن‌ها */
@keyframes formFadeInScale {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientGlow {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@keyframes floatIcon {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* استایل هشدارها (Glassy Alerts) */
.custom-alerts-container {
    margin-top: 30px;
}

.custom-alert {
    display: flex;
    align-items: center;
    padding: 18px;
    border-radius: 18px;
    margin-bottom: 15px;
    animation: slideInBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    backdrop-filter: blur(10px);
}

.alert-warning {
    background-color: rgba(254, 243, 199, 0.8);
    border: 1px solid rgba(253, 230, 138, 0.8);
    color: #92400e;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.15);
}

.alert-danger {
    background-color: rgba(254, 226, 226, 0.8);
    border: 1px solid rgba(254, 202, 202, 0.8);
    color: #991b1b;
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.15);
}

.alert-icon {
    margin-left: 14px;
    display: flex;
    background: #ffffff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.alert-content {
    flex-grow: 1;
    font-size: 15px;
    font-weight: 700;
}

.alert-close {
    background: #ffffff;
    border: none;
    border-radius: 10px;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

    .alert-close:hover {
        transform: scale(1.1) rotate(90deg);
        background: #f1f5f9;
    }

@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
