/* ===================================
   MLM Platform - Authentication Styles
   ================================== */

/* === CSS Variables === */
:root {
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --primary-purple: #667eea;
    --color-white: #ffffff;
    --color-dark: #1a1a2e;
    --color-gray: #6c757d;
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    position: relative;
    overflow: hidden;
    font-size: 16px;
}

/* Animated Background */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
    opacity: 0.1;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--gradient-2);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--gradient-3);
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.2);
    top: 50%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(50px, 100px) rotate(120deg);
    }
    66% {
        transform: translate(-50px, 50px) rotate(240deg);
    }
}

/* Auth Container */
.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    padding: 20px;
    margin: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 50px 45px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.auth-header p {
    font-size: 17px;
    color: var(--color-gray);
}

/* Form Styles */
.auth-form {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--color-dark);
    font-size: 17px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--color-gray);
    transition: var(--transition);
}

.form-control {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 17px;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control:focus + .input-icon {
    color: var(--primary-purple);
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    color: var(--color-gray);
    cursor: pointer;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-purple);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-purple);
}

.remember-me label {
    margin: 0;
    cursor: pointer;
    font-size: 16px;
    color: var(--color-dark);
}

.forgot-link {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    padding: 18px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

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

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.btn-auth:active {
    transform: translateY(0);
}

/* Divider */
.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e1e8ed;
}

.divider span {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    padding: 0 15px;
    color: var(--color-gray);
    font-size: 16px;
}

/* Social Login */
.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn i {
    font-size: 22px;
}

.social-btn.google {
    color: #DB4437;
}

.social-btn.facebook {
    color: #4267B2;
}

.social-btn.twitter {
    color: #1DA1F2;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: currentColor;
}

/* Footer Links */
.auth-footer {
    text-align: center;
    font-size: 17px;
}

.auth-footer p {
    color: var(--color-gray);
    margin-bottom: 10px;
}

.auth-footer a {
    color: var(--primary-purple);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Success Message */
.success-message {
    background: rgba(67, 233, 123, 0.1);
    border: 2px solid #43e97b;
    color: #2d7a4f;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message i {
    font-size: 24px;
}

/* Error Message */
.error-message {
    background: rgba(245, 87, 108, 0.1);
    border: 2px solid #f5576c;
    color: #c43347;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    animation: shake 0.5s ease-out;
}

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

.error-message i {
    font-size: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 18px;
    }
    
    .auth-container {
        padding: 15px;
        margin: 15px;
    }
    
    .auth-card {
        padding: 40px 30px;
        border-radius: 20px;
    }
    
    .logo {
        width: 75px;
        height: 75px;
        font-size: 38px;
    }
    
    .auth-header h1 {
        font-size: 28px;
    }
    
    .auth-header p {
        font-size: 18px;
    }
    
    .form-group label {
        font-size: 18px;
    }
    
    .form-control {
        font-size: 18px;
        padding: 18px 20px 18px 55px;
    }
    
    .input-icon {
        font-size: 22px;
    }
    
    .btn-auth {
        font-size: 19px;
        padding: 20px;
    }
    
    .remember-me label,
    .forgot-link,
    .divider span {
        font-size: 17px;
    }
    
    .social-btn {
        font-size: 17px;
        padding: 16px;
    }
    
    .auth-footer {
        font-size: 18px;
    }
    
    .success-message,
    .error-message {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 19px;
    }
    
    .auth-card {
        padding: 35px 25px;
    }
    
    .logo {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }
    
    .auth-header h1 {
        font-size: 26px;
    }
    
    .auth-header p {
        font-size: 19px;
    }
    
    .form-group label {
        font-size: 19px;
    }
    
    .form-control {
        font-size: 19px;
        padding: 20px 20px 20px 55px;
    }
    
    .btn-auth {
        font-size: 20px;
        padding: 22px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .social-btn {
        font-size: 18px;
        padding: 18px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .remember-me label,
    .forgot-link {
        font-size: 18px;
    }
    
    .auth-footer {
        font-size: 19px;
    }
}

/* Loading State */
.btn-auth.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
