/**
 * Login Page Styling - Glassmorphism Theme
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(var(--gradient-angle, 135deg), var(--gradient-start, #667eea) 0%, var(--gradient-end, #764ba2) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    padding: 20px 0;
}

/* Animated background particles */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    animation: particleMove 20s linear infinite;
}

@keyframes particleMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Login container */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

/* Glassmorphism card */
.login-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    padding: 30px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo section */
.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    max-width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.login-title {
    color: white;
    font-size: 28px;
    font-weight: 600;
    margin-top: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-top: 8px;
}

/* Form elements */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--primary-color, #667eea);
}

.form-checkbox label {
    color: white;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

/* Submit button */
.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(var(--gradient-angle, 135deg), var(--gradient-start, #667eea) 0%, var(--gradient-end, #764ba2) 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color, #667eea) 40%, transparent);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color, #667eea) 50%, transparent);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Secondary button */
.btn-secondary {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Links */
.form-links {
    text-align: center;
    margin-top: 25px;
}

.form-link {
    color: white;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.form-link:hover {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Error message */
.error-message {
    background: rgba(244, 67, 54, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: shake 0.5s;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Success message */
.success-message {
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideDown 0.5s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MFA section */
.mfa-section {
    text-align: center;
}

.qr-code {
    margin: 15px auto;
    padding: 15px;
    background: white;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qr-code img {
    display: block;
    max-width: 180px;
    height: auto;
}

.manual-code {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 10px;
    margin: 12px 0;
    word-break: break-all;
    font-family: monospace;
    font-size: 13px;
    color: white;
}

/* Code input (for MFA) */
.code-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 10px;
    font-weight: 600;
}

/* MFA Steps */
.mfa-step {
    animation: fadeIn 0.3s ease-in;
}

/* App Download Buttons */
.app-download-btn {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px 25px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    min-width: 150px;
}

.app-download-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* App Download Button Images */
.app-download-btn-image {
    display: inline-block;
    transition: all 0.3s ease;
    opacity: 0.95;
}

.app-download-btn-image:hover {
    opacity: 1;
    transform: translateY(-3px);
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.3));
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .login-card {
        padding: 40px 30px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .form-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .btn-submit {
        padding: 12px;
        font-size: 15px;
    }
}
