/* -------------------------------------------
   自定义暗系 WordPress 登录页面样式
   ------------------------------------------- */

/* 全局样式 - 背景、字体、居中 */
body.login {
    background: linear-gradient(135deg, #1A2A3A, #0D1A2A); /* 深蓝灰色渐变背景 */
    /* 或者使用图片背景： */
    /* background: url('../images/dark-background.jpg') no-repeat center center fixed; */
    /* background-size: cover; */
    /* filter: brightness(0.8) contrast(1.2); /* 调整图片亮度对比度 */
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif; /* 现代字体 */
    color: #E0E0E0; /* 浅灰色文字 */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden; /* 防止滚动条 */
    flex-direction: column; /* 让所有直接子元素垂直堆叠 */
}

/* 隐藏默认的WordPress Logo，替换为自定义Logo */
.login h1 a {
    background-image: url('../images/your-logo-light.png') !important; /* 替换为你的Logo路径 */
    background-size: contain !important; /* 保持图片比例 */
    background-position: center center !important; /* 居中显示 */
    background-repeat: no-repeat !important;
    width: 180px !important; /* Logo宽度 */
    height: 80px !important; /* Logo高度 */
    margin: 0 auto 30px auto !important; /* 居中并下方留白 */
    padding-bottom: 0 !important; /* 移除WordPress默认的Logo内边距 */
    box-shadow: none !important; /* 移除默认阴影 */
    outline: none !important; /* 移除聚焦边框 */
    /* 辅助调试：如果 Logo 仍不显示，尝试给一个背景色 */
    /* background-color: #f00; */
}

/* 登录表单容器 */
#login {
    background: rgba(30, 40, 50, 0.95); /* 深色半透明背景 */
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 188, 212, 0.1), /* 淡淡的蓝绿色发光效果 */
                0 0 20px rgba(0, 0, 0, 0.6);   /* 强一点的黑色阴影 */
    padding: 45px;
    max-width: 420px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.08); /* 细微的边框 */
    transform: perspective(1000px) rotateY(0deg); /* 初始状态 */
    animation: fadeInScale 0.8s ease-out forwards; /* 入场动画 */
    margin-bottom: 20px; /* 在登录框和底部链接之间添加一些底部外边距 */
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: perspective(1000px) rotateY(15deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) rotateY(0deg) scale(1);
    }
}

/* 登录/注册表单输入框的容器 */
#loginform p,
#registerform p, /* 针对注册页面 */
#lostpasswordform p /* 针对忘记密码页面 */ {
    margin-bottom: 20px;
}

/* 标签文字颜色 */
#loginform label,
#registerform label, /* 针对注册页面 */
#lostpasswordform label /* 针对忘记密码页面 */ {
    color: #BBBBBB; /* 浅灰色标签文字 */
    font-size: 14px;
    margin-bottom: 8px;
    display: block; /* 使标签独立一行 */
    text-align: left;
    font-weight: 500;
}

/* 表单输入框 */
#loginform input[type="text"],
#loginform input[type="password"],
#registerform input[type="text"], /* 针对注册页面 */
#registerform input[type="email"], /* 注册页面的邮箱字段 */
#lostpasswordform input[type="text"] /* 忘记密码页面的输入字段 */ {
    background-color: #2A3A4A; /* 比背景更深的输入框背景色 */
    color: #E0E0E0; /* 输入文字颜色 */
    border: 1px solid #4A5A6A; /* 边框颜色 */
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 16px;
    width: 100%; /* 全宽 */
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none; /* 移除默认聚焦边框 */
}

/* 输入框聚焦时效果 */
#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus,
#registerform input[type="text"]:focus,
#registerform input[type="email"]:focus,
#lostpasswordform input[type="text"]:focus {
    border-color: #00BCD4; /* 强调色边框 */
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.4); /* 强调色发光 */
    background-color: #203040; /* 聚焦时稍微变浅 */
}

/* 记住我复选框和标签 */
.login form .forgetmenot label {
    color: #BBBBBB;
    font-size: 14px;
    cursor: pointer;
    display: inline-block; /* 保持复选框和文字在一行 */
    margin-left: 5px; /* 调整间距 */
}
.login form .forgetmenot {
    text-align: left;
    margin-bottom: 25px;
}

/* 登录/注册/找回密码按钮 */
.login #wp-submit {
    background-color: #00BCD4; /* 强调色：蓝绿色 */
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%; /* 全宽按钮 */
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    text-transform: uppercase; /* 大写 */
    letter-spacing: 1px;
}

.login #wp-submit:hover {
    background-color: #00AABF; /* 鼠标悬停时颜色变深 */
    transform: translateY(-3px); /* 稍微上浮 */
    box-shadow: 0 10px 25px rgba(0, 188, 212, 0.3); /* 增强阴影和发光 */
}

.login #wp-submit:active {
    transform: translateY(0); /* 点击时下沉 */
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.2); /* 较小的阴影 */
}

/* 错误/成功消息提示 */
.login #login_error, .login .message, .login .success {
    border-left: 4px solid #FF5555; /* 错误颜色 */
    padding: 15px;
    margin-bottom: 25px;
    background-color: rgba(255, 0, 0, 0.15); /* 错误消息背景 */
    border-radius: 8px;
    color: #FF8888; /* 错误消息文字颜色 */
    text-align: left;
    font-size: 14px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.1);
}
.login .message, .login .success {
    border-left-color: #55FF55; /* 成功颜色 */
    background-color: rgba(0, 255, 0, 0.15); /* 成功消息背景 */
    color: #88FF88; /* 成功消息文字颜色 */
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
}

/* 默认的底部导航链接 (忘记密码 / 注册 / 返回网站) */
.login #nav {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    padding-top: 15px; /* 与登录框底部间距 */
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* 上方细线分隔 */
    /* 确保其背景透明，与 body 背景融合 */
    background: transparent;
    box-shadow: none;
}

.login #nav a {
    color: #00BCD4; /* 链接颜色 */
    text-decoration: none;
    transition: color 0.3s ease;
    margin: 0 8px; /* 链接间距 */
}

.login #nav a:hover {
    color: #00AABF;
    text-decoration: underline;
}

/* 隐藏 WordPress 默认的语言选择器 (通过其 id 来精确控制) */
/*
   **重要提示：** 如果此选择器不起作用，请使用浏览器开发者工具检查
   语言选择器表单的确切 ID 或 class。
   常见的 ID 是 "language-switcher"。
*/
.login #language-switcher,
.login form.language-switcher { /* 添加 class 选择器以防万一 */
    display: none !important;
}

/* 隐藏 WordPress 默认的“返回到网站”链接（在 #nav 上方或下方） */
.login #backtoblog {
    display: none !important;
}


/* 响应式设计 */
@media screen and (max-width: 480px) {
    #login {
        margin: 20px;
        padding: 30px;
        border-radius: 8px;
        margin-bottom: 15px; /* 手机端调整底部间距 */
    }
    .login h1 a {
        width: 150px !important;
        height: 60px !important;
        margin-bottom: 20px !important;
    }
    #loginform input[type="text"],
    #loginform input[type="password"],
    #registerform input[type="text"],
    #registerform input[type="email"],
    #lostpasswordform input[type="text"] {
        font-size: 15px;
        padding: 12px 15px;
    }
    .login #wp-submit {
        font-size: 16px;
        padding: 12px 25px;
    }
    .login #nav {
        margin-top: 15px;
        font-size: 13px;
    }
}