:root {
    --auth-primary: #667eea;
    --auth-secondary: #764ba2;
    --auth-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --auth-success: #28a745;
    --auth-danger: #dc3545;
    --auth-warning: #ffc107;
    --auth-info: #17a2b8;
    --auth-light: #f8f9fa;
    --auth-dark: #343a40;
    --auth-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
    --auth-shadow-hover: 0 15px 40px rgba(102, 126, 234, 0.25);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--auth-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--auth-shadow);
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-card:hover {
    box-shadow: var(--auth-shadow-hover);
    transform: translateY(-5px);
}

.auth-header {
    background: var(--auth-gradient);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.auth-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 10px solid var(--auth-secondary);
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    backdrop-filter: blur(10px);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.auth-subtitle {
    opacity: 0.9;
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
}

.auth-body {
    padding: 2rem;
}

/* Form Styles */
.form-floating {
    margin-bottom: 1rem;
}

.form-floating > .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    height: auto;
    transition: all 0.3s ease;
}

.form-floating > .form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-floating > label {
    color: #6c757d;
    font-weight: 500;
}

/* Buttons */
.btn-auth-primary {
    background: var(--auth-gradient);
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-auth-primary::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;
}

.btn-auth-primary:hover::before {
    left: 100%;
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-auth-secondary {
    background: transparent;
    border: 2px solid var(--auth-primary);
    color: var(--auth-primary);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-auth-secondary:hover {
    background: var(--auth-primary);
    color: white;
    transform: translateY(-2px);
}

/* Links */
.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--auth-secondary);
    text-decoration: underline;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Alert Styles */
.alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 1rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--auth-success);
    border-left: 4px solid var(--auth-success);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--auth-danger);
    border-left: 4px solid var(--auth-danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border-left: 4px solid var(--auth-warning);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--auth-info);
    border-left: 4px solid var(--auth-info);
}

/* Footer */
.auth-footer {
    text-align: center;
    padding: 1rem 2rem 2rem;
    border-top: 1px solid #f1f3f4;
    background: #f8f9fa;
}

.auth-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Back to Home */
.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 576px) {
    .auth-container {
        margin: 0 15px;
    }
    
    .auth-header,
    .auth-body {
        padding: 1.5rem;
    }
    
    .auth-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
    
    .back-home {
        top: 10px;
        left: 10px;
    }
}

/* Animation */
.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}