/* 
 * ZUOEKAI 主题 V3 - 登录页面样式
 * BEM 命名规范 | zuoekai-login 前缀
 * 
 * Block: .zuoekai-login
 * Elements: .zuoekai-login__element
 * Modifiers: .zuoekai-login--modifier
 */

/* ========================================
   Block: zuoekai-login (WordPress body.login)
   ======================================== */

/* zuoekai-login: 主容器 */
body.login {
    background: linear-gradient(-45deg, #5b21b6, #6b21a8, #7e22ce, #86198f);
    background-size: 400% 400%;
    animation: zuoekai-login-gradient 15s ease infinite;
    height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes zuoekai-login-gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* zuoekai-login__wrapper: 登录内容包裹器 (WordPress #login) */
#login {
    background: transparent;
    padding: 0;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

/* ========================================
   Element: zuoekai-login__header
   ======================================== */

/* zuoekai-login__header: Logo 容器 */
.login h1 {
    text-align: center;
    margin-bottom: 40px;
}

/* zuoekai-login__logo: Logo 链接 */
.login h1 a {
    background-image: none !important;
    width: auto !important;
    height: auto !important;
    text-indent: 0 !important;
    font-size: 36px !important;
    font-weight: 700 !important;
    color: white !important;
    text-decoration: none !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 0 !important;
    margin: 0 auto 20px !important;
    display: block;
    letter-spacing: 2px;
}

/* zuoekai-login__subtitle: 副标题 */
.login h1::after {
    content: 'Management System';
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: normal;
    margin-top: 8px;
    letter-spacing: 1px;
}

/* ========================================
   Element: zuoekai-login__form
   ======================================== */

/* zuoekai-login__form: 登录表单容器 - 毛玻璃效果 */
#loginform {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    box-shadow: none;
    padding: 40px;
    margin: 0 auto;
    max-width: 400px;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
}

/* ========================================
   Element: zuoekai-login__input
   ======================================== */

/* zuoekai-login__input: 输入框 */
#loginform input[type="text"],
#loginform input[type="password"] {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: white;
    padding: 15px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* zuoekai-login__input-placeholder: 输入框占位符 */
#loginform input[type="text"]::placeholder,
#loginform input[type="password"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* zuoekai-login__input--focused: 输入框聚焦状态 */
#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    outline: none;
}

/* zuoekai-login__password-toggle: 密码显示/隐藏按钮（小眼睛）*/
#loginform .wp-hide-pw,
#loginform button.wp-hide-pw {
    color: #333333 !important;
    opacity: 0.8;
    right: 12px !important;
    display: flex !important;
    align-items: center !important;
}

#loginform .wp-hide-pw:hover,
#loginform button.wp-hide-pw:hover {
    color: #000000 !important;
    opacity: 0.8;
}

/* 密码输入框容器位置调整 */
.login .wp-pwd {
    position: relative;
}

.login .wp-pwd .dashicons {
    color: #333333 !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
}

/* 密码输入框留出右侧空间给按钮 */
.login .wp-pwd input[type="password"] {
    padding-right: 45px !important;
}

/* ========================================
   Element: zuoekai-login__button
   ======================================== */

/* zuoekai-login__button: 登录按钮 */
#loginform .submit .button,
#loginform .submit .button-primary {
    background: rgba(255, 255, 255, 0.25) !important;
    border: none !important;
    color: white !important;
    padding: 15px 30px;
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-shadow: none !important;
    box-shadow: none !important;
}

/* zuoekai-login__button--hovered: 按钮悬停状态 */
#loginform .submit .button:hover,
#loginform .submit .button-primary:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

/* ========================================
   Element: zuoekai-login__label
   ======================================== */

/* zuoekai-login__label: 表单标签 */
#loginform label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
    font-weight: 500;
}

/* ========================================
   Element: zuoekai-login__remember
   ======================================== */

/* zuoekai-login__remember: 记住我容器 */
#loginform .forgetmenot {
    margin-bottom: 20px;
}

/* zuoekai-login__remember-label: 记住我标签 */
#loginform .forgetmenot label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

/* zuoekai-login__checkbox: 复选框 */
#loginform input[type="checkbox"] {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    width: 16px;
    height: 16px;
    position: relative;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* zuoekai-login__checkbox--checked: 复选框选中状态 */
#loginform input[type="checkbox"]:checked {
    background: rgba(255, 255, 255, 0.3);
    position: relative;
}

/* zuoekai-login__checkbox-checkmark: 复选框勾选标记 */
#loginform input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* ========================================
   Element: zuoekai-login__nav
   ======================================== */

/* zuoekai-login__nav: 导航链接容器 */
.login #nav {
    text-align: center;
    padding: 0;
    margin: 20px 0;
}

/* zuoekai-login__nav-link: 导航链接 */
.login #nav a,
.login #backtoblog a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

/* zuoekai-login__nav-link--hovered: 链接悬停状态 */
.login #nav a:hover,
.login #backtoblog a:hover {
    color: white !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ========================================
   Element: zuoekai-login__message
   ======================================== */

/* zuoekai-login__message: 消息提示框 */
.login #login_error,
.login .message,
.login .success {
    background: rgba(255, 255, 255, 0.12);
    border-left: 4px solid #7e22ce;
    color: white;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: none;
}

/* zuoekai-login__message--error: 错误消息 */
.login #login_error {
    border-left-color: #ff4444;
}

/* zuoekai-login__message--success: 成功消息 */
.login .success {
    border-left-color: #00c853;
}

/* ========================================
   Element: zuoekai-login__glow (已禁用)
   ======================================== */

/* zuoekai-login__glow: 表单周围的动态光效 - 已移除 */
/*
#loginform::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #5b21b6, #6b21a8, #7e22ce, #86198f);
    border-radius: 20px;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.6;
    animation: zuoekai-login-glow-rotate 4s linear infinite;
}

@keyframes zuoekai-login-glow-rotate {
    0% {
        filter: blur(20px) hue-rotate(0deg);
    }
    100% {
        filter: blur(20px) hue-rotate(360deg);
    }
}
*/

/* ========================================
   Block: zuoekai-login-particles (浮动粒子系统)
   ======================================== */

/* zuoekai-login-particles: 粒子容器 */
.zuoekai-login-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 兼容旧类名 */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

/* zuoekai-login-particles__item: 单个粒子 */
.zuoekai-login-particles__item,
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: zuoekai-login-particle-float 4s infinite ease-in-out;
}

@keyframes zuoekai-login-particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.5;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-35px) translateX(-15px);
        opacity: 1;
    }
    75% {
        transform: translateY(-20px) translateX(15px);
        opacity: 0.7;
    }
}

/* ========================================
   Element: zuoekai-login__backtoblog
   ======================================== */

/* zuoekai-login__backtoblog: 底部返回链接 */
.login #backtoblog {
    text-align: center;
    padding: 0;
    margin: 20px 0;
}

/* ========================================
   Modifier: zuoekai-login--mobile (响应式)
   ======================================== */

@media (max-width: 768px) {
    #loginform {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .login h1 a {
        font-size: 28px !important;
    }
    
    .login h1::after {
        font-size: 14px;
    }
}

/* ========================================
   Modifier: zuoekai-login__button--loading
   ======================================== */

/* zuoekai-login__button--loading: 按钮加载状态 */
.login .button-primary.loading {
    position: relative;
    color: transparent !important;
}

/* zuoekai-login__button-spinner: 加载动画 */
.login .button-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: zuoekai-login-spinner 0.8s linear infinite;
}

@keyframes zuoekai-login-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Modifier: zuoekai-login--dark-mode
   ======================================== */

@media (prefers-color-scheme: dark) {
    #loginform {
        background: rgba(255, 255, 255, 0.03);
    }
}
