/* Future Forward MLM - Login Styles */

/* Global Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(5deg); }
    66% { transform: translateY(5px) rotate(-3deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(25, 118, 210, 0.3); }
    50% { box-shadow: 0 0 30px rgba(25, 118, 210, 0.6); }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    opacity: 0.7;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #1976d2, #42a5f5);
    border-radius: 50%;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #dc004e, #f48fb1);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.shape-3 {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #388e3c, #81c784);
    border-radius: 20px;
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
    transform: rotate(45deg);
}

.shape-4 {
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #f57c00, #ffb74d);
    border-radius: 50%;
    top: 60%;
    right: 20%;
    animation-delay: 3s;
}

.shape-5 {
    width: 45px;
    height: 45px;
    background: linear-gradient(45deg, #7b1fa2, #ba68c8);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    bottom: 30%;
    right: 30%;
    animation-delay: 4s;
}

.shape-6 {
    width: 55px;
    height: 55px;
    background: linear-gradient(45deg, #303f9f, #7986cb);
    border-radius: 10px;
    top: 40%;
    left: 20%;
    animation-delay: 5s;
    transform: rotate(-15deg);
}

/* Mobile Responsive Shapes */
@media (max-width: 640px) {
    .shape-1 { width: 40px; height: 40px; }
    .shape-2 { width: 30px; height: 30px; }
    .shape-3 { width: 35px; height: 35px; }
    .shape-4 { width: 25px; height: 25px; }
    .shape-5 { width: 32px; height: 32px; }
    .shape-6 { width: 38px; height: 38px; }
}

/* Logo Animation */
.logo-container {
    animation: slide-up 0.8s ease-out;
}

.logo-container div {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Login Card Animations */
.login-card {
    animation: slide-up 0.6s ease-out 0.2s both;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Form Animations */
.form-group {
    animation: slide-up 0.4s ease-out both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

/* Input Focus Effects */
.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.15);
}

.form-input.error {
    border-color: #d32f2f;
    animation: shake 0.5s ease-in-out;
}

.error-message {
    animation: slide-up 0.3s ease-out;
}

/* Button Animations */
.login-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.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;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    box-shadow: 0 10px 30px rgba(25, 118, 210, 0.3);
}

.login-btn:active {
    box-shadow: 0 5px 15px rgba(25, 118, 210, 0.4);
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loading i {
    animation: spin 1s linear infinite;
}

/* Social Button Hover Effects */
.social-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.social-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(25, 118, 210, 0.1);
    transition: all 0.3s ease;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.social-btn:hover::after {
    width: 100px;
    height: 100px;
}

/* Alert Messages */
.alert-message {
    animation: slide-up 0.4s ease-out;
    transition: all 0.3s ease;
}

.alert-message.success {
    background-color: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-message.warning {
    background-color: #fff8e1;
    color: #ef6c00;
    border-left: 4px solid #ff9800;
}

/* Demo Credentials Animation */
.demo-credentials {
    animation: slide-up 0.6s ease-out 0.8s both;
    backdrop-filter: blur(5px);
}

/* Password Toggle Animation */
#togglePassword {
    transition: all 0.2s ease;
}

#togglePassword:hover {
    transform: scale(1.1);
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .login-card {
        margin: 10px;
        padding: 20px;
    }

    .form-input {
        padding: 10px 12px 10px 40px;
        font-size: 14px;
    }

    .login-btn {
        padding: 12px;
        font-size: 14px;
    }

    .demo-credentials {
        margin: 15px 10px;
        padding: 15px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .login-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .social-btn:hover {
        transform: none;
        box-shadow: none;
    }

    .form-input:focus {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .background-animation {
        background: #ffffff;
    }

    .shape {
        opacity: 0.3;
    }

    .login-card {
        background: #ffffff;
        border: 2px solid #000000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .floating-shapes .shape {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .background-animation {
        background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
    }

    .login-card {
        background: rgba(30, 30, 30, 0.95);
        color: #ffffff;
    }

    .form-input {
        background-color: #2d2d2d;
        color: #ffffff;
        border-color: #404040;
    }

    .form-label {
        color: #e0e0e0;
    }

    .demo-credentials {
        background: rgba(30, 30, 30, 0.8);
        color: #ffffff;
    }
}

/* Print Styles */
@media print {
    .background-animation,
    .floating-shapes,
    .demo-credentials {
        display: none;
    }

    .login-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
