/* Enhanced Modern Auth Styles */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.auth-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Floating geometric shapes */
.auth-container .shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: shapeFloat 10s ease-in-out infinite;
}

.auth-container .shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.auth-container .shape:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 20%;
    right: 10%;
    animation-delay: 2s;
}

.auth-container .shape:nth-child(3) {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.auth-container .shape:nth-child(4) {
    width: 40px;
    height: 40px;
    bottom: 10%;
    right: 20%;
    animation-delay: 6s;
}

@keyframes shapeFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.3;
    }
}

.auth-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    max-width: 420px;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.auth-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 35px 60px rgba(0, 0, 0, 0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: white;
    font-size: 1.75rem;
    font-weight: bold;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.auth-logo-icon:hover {
    transform: scale(1.1);
}

.auth-title {
    text-align: center;
    color: #2d3748;
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-subtitle {
    text-align: center;
    color: #718096;
    font-size: 1rem;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.75rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #a0aec0;
    font-size: 0.95rem;
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    z-index: 3;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.btn-auth {
    width: 100%;
    padding: 1.125rem 1.5rem;
    border: none;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-register {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth.loading {
    pointer-events: none;
}

.btn-auth.loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    top: 50%;
    left: 50%;
    margin: -11px 0 0 -11px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-link {
    text-align: center;
    margin-top: 2rem;
    color: #718096;
    font-size: 1rem;
    font-weight: 500;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
}

.auth-link a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.auth-link a:hover {
    color: #764ba2;
}

.auth-link a:hover::after {
    width: 100%;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
}

.alert-danger {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #c53030;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.2);
}

.alert-success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #2f855a;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.2);
}

/* Password strength indicator */
.password-strength {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    display: inline-block;
}

.password-strength.weak {
    background: #fed7d7;
    color: #c53030;
}

.password-strength.medium {
    background: #fefcbf;
    color: #d69e2e;
}

.password-strength.strong {
    background: #c6f6d5;
    color: #38a169;
}

.password-strength.very-strong {
    background: #b2f5ea;
    color: #319795;
    box-shadow: 0 2px 8px rgba(49, 151, 149, 0.2);
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        padding: 15px;
    }
    
    .auth-card {
        padding: 2rem 1.25rem;
        border-radius: 20px;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-logo-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .form-control {
        padding: 0.875rem 1rem;
    }
    
    .btn-auth {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
}

/* Animation for form elements */
.form-group {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.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; }

/* Floating animation for the card */
@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-card {
    animation: floatIn 0.8s ease-out forwards;
}

/* Success message animation */
@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(72, 187, 120, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(72, 187, 120, 0.6);
    }
}

.alert-success {
    animation: successPulse 2s ease-in-out infinite;
}
