* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    min-height: 100vh;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
            radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    bottom: -100px;
    left: -100px;
    animation-delay: 5s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.login-card {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    padding: 45px 40px;
    box-shadow:
            0 25px 60px rgba(0, 0, 0, 0.3),
            0 0 0 1px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.logo-section {
    text-align: center;
    margin-bottom: 35px;
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.logo-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            45deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.logo-wrapper img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 10px;
    position: relative;
    z-index: 1;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-title {
    text-align: center;
    margin-bottom: 35px;
}

.login-title h1 {
    font-size: 24px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 12px;
}

.login-title p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}

.form-container {
    margin-bottom: 25px;
}

.field {
    position: relative;
    margin-bottom: 24px;
}

.field input {
    width: 100%;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.6);
    font-size: 15px;
    color: #f8fafc;
    outline: none;
    transition: all 0.3s ease;
}

.field input::placeholder {
    color: transparent;
}

.field input:focus {
    border-color: #3b82f6;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.field label {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    padding: 0 8px;
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
    top: -10px;
    font-size: 12px;
    color: #3b82f6;
    background: rgba(30, 41, 59, 0.95);
    padding: 0 8px;
}

.field-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
    transition: color 0.3s ease;
}

.field input:focus ~ .field-icon {
    color: #3b82f6;
}

.remember {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 28px;
    user-select: none;
    cursor: pointer;
}

.remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-left: 10px;
    cursor: pointer;
    appearance: none;
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.6);
    position: relative;
    transition: all 0.3s ease;
}

.remember input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-color: transparent;
}

.remember input[type="checkbox"]:checked::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.login-btn {
    width: 100%;
    border: none;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
    font-family: Vazirmatn;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.footer-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.footer-text {
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3b82f6;
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    .login-card {
        padding: 35px 28px;
        border-radius: 20px;
    }

    .logo-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 18px;
    }

    .logo-wrapper img {
        width: 45px;
        height: 45px;
    }

    .logo-text {
        font-size: 24px;
    }

    .login-title h1 {
        font-size: 21px;
    }

    .login-title p {
        font-size: 13px;
    }

    .field input {
        padding: 14px 16px;
        font-size: 14px;
    }

    .field label {
        font-size: 13px;
    }

    .login-btn {
        padding: 15px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 30px 22px;
    }

    .logo-text {
        font-size: 22px;
    }

    .login-title h1 {
        font-size: 19px;
    }
}