/*
 * Beautiful Dark Mode Login Page
 * QR Scanner Login Styles with Montserrat Font
 */

/* Import Montserrat Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

/* Login Page Dark Mode */
body.login {
    background: #0f0f23 !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    overflow: hidden;
}

/* Animated Background */
body.login::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

#login {
    background: rgba(22, 33, 62, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid #2d2d3a !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
    padding: 3rem !important;
    width: 450px !important;
    margin: auto !important;
    position: relative;
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
    border-radius: 24px 24px 0 0;
}

/* Login Form */
#loginform {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Logo Area */
#login h1 {
    text-align: center !important;
    margin-bottom: 2rem !important;
}

#login h1 a {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    font-family: 'Montserrat', sans-serif !important;
    text-decoration: none !important;
    letter-spacing: -0.02em !important;
    text-shadow: 0 0 30px rgba(233, 69, 96, 0.3) !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
}

#login h1 a::before {
    content: '🎯 ';
    font-size: 2rem;
    margin-right: 0.5rem;
}

/* Form Labels */
#loginform label {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    margin-bottom: 0.75rem !important;
    display: block !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Form Inputs */
#loginform input[type="text"],
#loginform input[type="password"],
#loginform input[type="email"] {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 2px solid #2d2d3a !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    padding: 1.25rem !important;
    font-size: 1rem !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-bottom: 1.5rem !important;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus,
#loginform input[type="email"]:focus {
    outline: none !important;
    border-color: #e94560 !important;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-2px);
}

#loginform input::placeholder {
    color: #a0a0a0 !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Submit Button */
#loginform .button-primary,
#wp-submit {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    border: none !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    padding: 1.25rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    font-family: 'Montserrat', sans-serif !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-top: 1rem !important;
}

#loginform .button-primary:hover,
#wp-submit:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 35px rgba(240, 147, 251, 0.6) !important;
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%) !important;
}

#loginform .button-primary:active,
#wp-submit:active {
    transform: translateY(-1px) !important;
}

/* Remember Me */
.forgetmenot {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin: 1.5rem 0 !important;
}

.forgetmenot label {
    color: #a0a0a0 !important;
    font-weight: 400 !important;
    font-size: 0.9rem !important;
    margin: 0 !important;
    cursor: pointer !important;
}

.forgetmenot input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    accent-color: #e94560 !important;
    cursor: pointer !important;
}

/* Links */
#login #nav,
#login #backtoblog {
    text-align: center !important;
    margin-top: 2rem !important;
}

#login #nav a,
#login #backtoblog a {
    color: #e94560 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
}

#login #nav a:hover,
#login #backtoblog a:hover {
    color: #ffffff !important;
    text-shadow: 0 0 12px #e94560 !important;
}

/* Error Messages */
#login .message,
#login .notice {
    background: rgba(22, 33, 62, 0.9) !important;
    border: 1px solid #2d2d3a !important;
    border-left: 4px solid #00ff88 !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    padding: 1.5rem !important;
    margin-bottom: 2rem !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    animation: slideInDown 0.4s ease-out;
}

#login .login-error {
    background: rgba(255, 85, 85, 0.1) !important;
    border-left-color: #ff5555 !important;
    color: #ff5555 !important;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.wp-core-ui .button.loading {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.8 !important;
}

.wp-core-ui .button.loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 1rem !important;
    width: 20px !important;
    height: 20px !important;
    margin-top: -10px !important;
    border: 2px solid transparent !important;
    border-top: 2px solid currentColor !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    #login {
        width: 90% !important;
        padding: 2rem !important;
        margin: 2rem auto !important;
    }
    
    #login h1 a {
        font-size: 2rem !important;
    }
    
    #loginform input[type="text"],
    #loginform input[type="password"],
    #loginform input[type="email"] {
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }
    
    #loginform .button-primary,
    #wp-submit {
        padding: 1rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
}

/* Custom Focus Styles */
*:focus {
    outline: none !important;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Privacy Policy Link */
.privacy-policy-link {
    text-align: center !important;
    margin-top: 1rem !important;
}

.privacy-policy-link a {
    color: #a0a0a0 !important;
    font-size: 0.8rem !important;
    text-decoration: none !important;
    font-family: 'Montserrat', sans-serif !important;
}

.privacy-policy-link a:hover {
    color: #e94560 !important;
}