/* =============================================================================
   WordPress Login Page Styles - AI Competition Theme
   Author: AI Assistant
   Description: Beautiful and modern styling for WordPress login page
   ========================================================================== */

/* ===== GLOBAL LOGIN PAGE STYLES ===== */
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;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    position: relative;
    overflow: hidden;
    flex-direction: column;
}

.message p{
    color: #000;
}

/* Background Pattern */
body.login::before {
    content: '';
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    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%);
    z-index: 1;
}

/* ===== LOGIN FORM CONTAINER ===== */
#loginform {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideInUp 0.6s ease-out;
}

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

/* ===== LOGO STYLING ===== */
.login h1 a {
    /* background-image: url('../../images/assets/logo.png'); */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 200px !important;
    height: 80px;
    margin: 0 auto 30px;
    display: block;
    transition: transform 0.3s ease;
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.login h1 a:hover {
    transform: scale(1.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== FORM ELEMENTS ===== */
.login form {
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
    border: none;
}

.login form .input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.login form .input:focus {
    border-color: #5d3ae1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(93, 58, 225, 0.1);
    /* transform: translateY(-2px); */
}

.login form .input::placeholder {
    color: #a0a0a0;
    font-style: italic;
}

/* ===== PASSWORD FIELD ===== */
.login form .input[type="password"] {
    margin-bottom: 25px;
}

.language-switcher {
    display: none;
}

/* ===== REMEMBER ME CHECKBOX ===== */
.login .forgetmenot {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login .forgetmenot input[type="checkbox"] {
    width: 20px;
    height: 20px;
    appearance: none;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.login .forgetmenot input[type="checkbox"]:checked {
    background: #5d3ae1;
    border-color: #5d3ae1;
}

.login .forgetmenot input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
}

.login .forgetmenot input[type="checkbox"]:hover {
    border-color: #5d3ae1;
    transform: scale(1.05);
}

.login .forgetmenot label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

/* ===== LOGIN BUTTON ===== */
.login .button-primary {
    width: 100%;
    background: linear-gradient(135deg, #5d3ae1, #a855f7);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(93, 58, 225, 0.3);
}

.login .button-primary:hover {
    background: linear-gradient(135deg, #4c2fd3, #9333ea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(93, 58, 225, 0.4);
}

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

/* ===== LOST PASSWORD LINK ===== */
.login #nav {
    text-align: center;
    margin-top: 20px;
}

.login #nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
}

.login #nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===== BACK TO BLOG LINK ===== */
.login #backtoblog {
    text-align: center;
    margin-top: 15px;
}

.login #backtoblog a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.login #backtoblog a:hover {
    color: #ffffff;
}

/* ===== ERROR MESSAGES ===== */
.login .message,
.login #login_error {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 0 0 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #5d3ae1;
    animation: slideInDown 0.5s ease-out;
}

.login #login_error {
    border-left-color: #dc3545;
    background: rgba(248, 215, 218, 0.95);
    color: #000 !important;
}

.login .message {
    border-left-color: #28a745;
    background: rgba(212, 237, 218, 0.95);
    color: #155724;
}

body.login #login {
    max-width: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    align-items: center;
}

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

/* ===== FORM LABELS ===== */
.login label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

/* ===== CUSTOM AI COMPETITION BRANDING ===== */
.login .ai-competition-branding {
    text-align: center;
    margin-top: 30px;
    color: #ffffff;
}

.login .ai-competition-branding h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login .ai-competition-branding p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
    font-style: italic;
}

/* ===== LOADING STATES ===== */
.login .loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.login .loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #5d3ae1;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== FORM VALIDATION STATES ===== */
.login form .input.error {
    border-color: #dc3545;
    background: rgba(248, 215, 218, 0.1);
    animation: shake 0.5s ease-in-out;
}

.login form .input.success {
    border-color: #28a745;
    background: rgba(212, 237, 218, 0.1);
}

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

/* ===== CUSTOM SCROLLBAR ===== */
body.login::-webkit-scrollbar {
    width: 8px;
}

body.login::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

body.login::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #5d3ae1, #a855f7);
    border-radius: 4px;
}

body.login::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4c2fd3, #9333ea);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 480px) {
    body.login {
        padding: 10px;
    }
    
    #loginform {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .login h1 a {
        width: 150px;
        height: 60px;
    }
    
    .login .button-primary {
        font-size: 14px;
        padding: 14px 18px;
    }
    
    .login .ai-competition-branding h2 {
        font-size: 20px;
    }
    
    .login .ai-competition-branding p {
        font-size: 12px;
    }
    
    .login form .input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    #loginform {
        background: rgba(30, 30, 30, 0.95);
        color: #ffffff;
    }
    
    .login form .input {
        background: #2a2a2a;
        border-color: #444;
        color: #ffffff;
    }
    
    .login form .input::placeholder {
        color: #888;
    }
    
    .login label {
        color: #ffffff;
    }
    
    .login .forgetmenot label {
        color: #ccc;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.login form .input:focus-visible {
    outline: 2px solid #5d3ae1;
    outline-offset: 2px;
}

.login .button-primary:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .login form .input {
        border-width: 3px;
    }
    
    .login .button-primary {
        border: 2px solid #ffffff;
    }
    
    .login #nav a {
        border-width: 2px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .login form .input,
    .login .button-primary,
    .login #nav a,
    .login h1 a {
        transition: none;
    }
    
    .login .button-primary.loading::after {
        animation: none;
    }
    
    #loginform {
        animation: none;
    }
    
    .login h1 a {
        animation: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    body.login {
        background: #ffffff !important;
    }
    
    #loginform {
        box-shadow: none;
        border: 2px solid #000000;
    }
    
    .login .ai-competition-branding {
        color: #000000 !important;
    }
}
