/**
 * 登录页面样式
 *
 * @package Game_Zeeurnsha
 * @author 白木
 * @link https://gl.baimu.live/
 * @version 1.0.0
 * @since 1.0.0
 */

/* 登录页面背景 */
body.login {
    background: linear-gradient(135deg, #FCE7F3 0%, #FAE8FF 30%, #DDD6FE 60%, #C7D2FE 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: 0;
    box-sizing: border-box;
}

/* 登录表单容器 */
body.login #login {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    width: 100%;
    max-width: 400px;
    margin: 0;
}

/* Logo */
body.login #login h1 a {
    background-image: none;
    width: auto;
    height: auto;
    text-indent: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1A1A2E;
    text-decoration: none;
    margin-bottom: 30px;
}

/* 表单 */
body.login form {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-top: 20px;
    overflow: visible !important;
}

/* 输入框容器 - 相对定位用于浮动标签 */
body.login form p,
body.login .user-pass-wrap {
    position: relative;
    margin-bottom: 20px;
    overflow: visible !important;
    min-height: 65px;
}

/* 输入框 */
body.login form .input {
    background: #fff;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    color: #1A1A2E;
    transition: all 0.3s ease;
    width: 100%;
    height: 48px;
    box-sizing: border-box;
}

body.login form .input:focus {
    border-color: #A78BFA;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
    outline: none;
}

/* 标签 - 勋章标签风格，非聚焦状态在输入框内部居中 */
body.login form p > label[for="user_login"],
body.login .user-pass-wrap > label[for="user_pass"] {
    position: absolute !important;
    left: 16px !important;
    top: 24px !important;
    transform: translateY(-50%) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    pointer-events: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 10 !important;
    background: linear-gradient(135deg, #E879F9 0%, #A78BFA 100%) !important;
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 8px rgba(167, 139, 250, 0.3) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    height: fit-content !important;
}

/* 聚焦时标签浮动到边框左上边缘 */
body.login form p:focus-within > label[for="user_login"],
body.login .user-pass-wrap:focus-within > label[for="user_pass"] {
    top: -12px !important;
    left: 12px !important;
    transform: translateY(0) scale(0.8) !important;
    background: linear-gradient(135deg, #E879F9 0%, #A78BFA 100%) !important;
    color: #fff !important;
    padding: 2px 10px !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(167, 139, 250, 0.4) !important;
    z-index: 100 !important;
}

/* 记住我区域的标签不需要浮动效果 */
body.login .forgetmenot label {
    position: static;
    transform: none;
    background: transparent;
    color: #6B7280;
    padding: 0;
    box-shadow: none;
    pointer-events: auto;
}

/* 提交按钮容器 */
body.login p.submit {
    margin-top: 8px;
    margin-bottom: 16px;
    padding: 0;
}

/* 提交按钮 */
body.login .button-primary {
    background: linear-gradient(135deg, #E879F9 0%, #A78BFA 100%);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-shadow: none;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.4);
    transition: all 0.3s ease;
    width: 100%;
}

body.login .button-primary:hover {
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.6);
    transform: translateY(-2px);
}

/* 记住我 */
body.login .forgetmenot {
    margin-top: 16px;
    margin-bottom: 8px;
}

body.login .forgetmenot input[type="checkbox"] {
    accent-color: #A78BFA;
}

/* 底部链接 */
body.login #nav,
body.login #backtoblog {
    text-align: center;
    padding: 0;
}

/* 忘记密码链接增加间距 */
body.login #nav {
    margin-top: 32px;
}

body.login #backtoblog {
    margin-top: 16px;
}

body.login #nav a,
body.login #backtoblog a {
    color: #6B7280;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s ease;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
    color: #A78BFA;
}

/* 消息提示 */
body.login .message,
body.login #login_error {
    background: rgba(167, 139, 250, 0.1);
    border-left: 4px solid #A78BFA;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

body.login #login_error {
    border-left-color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

/* 语言切换器卡片 */
body.login .language-switcher {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    margin: 6px 0 0 0;
    width: 100%;
    max-width: 400px;
    position: static;
    clear: both;
    flex-shrink: 0;
}

body.login .language-switcher form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
}

body.login .language-switcher label {
    display: flex;
    align-items: center;
    margin: 0;
    color: #6B7280;
}

body.login .language-switcher .dashicons-translation {
    font-size: 20px;
    color: #A78BFA;
}

body.login .language-switcher select {
    flex: 1;
    background: #fff;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: #1A1A2E;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

body.login .language-switcher select:focus {
    border-color: #A78BFA;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

body.login .language-switcher .button {
    background: linear-gradient(135deg, #E879F9 0%, #A78BFA 100%);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

body.login .language-switcher .button:hover {
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.4);
    transform: translateY(-1px);
}
