/**
 * Power Register Login Custom - Modern WordPress Login Page Styles
 * Ultra-modern design for wp-login.php
 * Author: Hasan B.
 */

/* ========================================
   Body & Background
======================================== */

body.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body.login::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,197.3C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    pointer-events: none;
}

/* ========================================
   Login Container
======================================== */

#login {
    padding: 8% 0 0;
    width: 450px;
}

/* ========================================
   Logo
======================================== */

#login h1 {
    margin-bottom: 30px;
}

#login h1 a {
    background-image: none;
    background-size: contain;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0;
    text-indent: 0;
    font-size: 48px;
    text-align: center;
    transition: all 0.3s ease;
}

#login h1 a::before {
    content: '🔐';
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#login h1 a:hover::before {
    transform: scale(1.1);
}

/* ========================================
   Login Form Container
======================================== */

#loginform,
#registerform,
#lostpasswordform {
    background: #fff;
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: slideUp 0.5s ease;
}

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

#login form {
    margin-top: 0;
}

/* ========================================
   Form Title
======================================== */

#login form::before {
    content: 'Welcome Back';
    display: block;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

#loginform::after,
#registerform::after,
#lostpasswordform::after {
    content: 'Please enter your credentials';
    display: block;
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 25px;
}

#registerform::before {
    content: 'Create Account';
}

#registerform::after {
    content: 'Join us today';
}

#lostpasswordform::before {
    content: 'Reset Password';
}

#lostpasswordform::after {
    content: 'Enter your email to receive reset link';
}

/* ========================================
   Form Fields
======================================== */

#login form label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

#login form input[type="text"],
#login form input[type="password"],
#login form input[type="email"] {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: none;
    font-family: inherit;
}

#login form input[type="text"]:focus,
#login form input[type="password"]:focus,
#login form input[type="email"]:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

#login form input[type="text"]:hover,
#login form input[type="password"]:hover,
#login form input[type="email"]:hover {
    border-color: #bbb;
}

/* ========================================
   Checkbox
======================================== */

#login form .forgetmenot {
    margin: 20px 0;
}

#login form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-right: 8px;
    cursor: pointer;
}

#login form .forgetmenot label {
    font-weight: normal;
    color: #666;
    cursor: pointer;
}

/* ========================================
   Submit Button
======================================== */

#login form .button-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    height: auto;
    text-transform: none;
}

#login form .button-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

#login form .button-primary:active {
    transform: translateY(0);
}

#login form .button-primary:focus {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

/* ========================================
   Form Links
======================================== */

#login #nav,
#login #backtoblog {
    text-align: center;
    margin-top: 20px;
    padding: 0;
}

#login #nav a,
#login #backtoblog a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
}

#login #nav a:hover,
#login #backtoblog a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   Messages
======================================== */

#login .message,
#login .success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    color: #155724;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
    animation: fadeIn 0.3s ease;
}

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

#login #login_error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.1);
    animation: shake 0.5s ease;
}

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

#login .message a,
#login #login_error a {
    color: inherit;
    text-decoration: underline;
}

/* ========================================
   Privacy Policy Link
======================================== */

.privacy-policy-page-link {
    text-align: center;
    margin-top: 20px;
}

.privacy-policy-page-link a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
}

.privacy-policy-page-link a:hover {
    color: #fff;
}

/* ========================================
   Language Switcher
======================================== */

.login .language-switcher {
    text-align: center;
    margin-top: 20px;
}

.login .language-switcher label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.login .language-switcher select {
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ========================================
   Interim Login
======================================== */

.interim-login #login {
    padding-top: 4%;
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 768px) {
    #login {
        width: 90%;
        padding-top: 12%;
    }
    
    #loginform,
    #registerform,
    #lostpasswordform {
        padding: 30px 25px;
        border-radius: 15px;
    }
    
    #login form::before {
        font-size: 20px;
    }
    
    #login form input[type="text"],
    #login form input[type="password"],
    #login form input[type="email"] {
        padding: 12px 14px;
    }
    
    #login form .button-primary {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    #login {
        width: 95%;
    }
    
    #login h1 a::before {
        font-size: 40px;
    }
}

/* ========================================
   Loading State
======================================== */

#login form.loading .button-primary {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

#login form.loading .button-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   Print Styles
======================================== */

@media print {
    body.login {
        background: #fff;
    }
    
    #loginform,
    #registerform,
    #lostpasswordform {
        box-shadow: none;
    }
}
