:root {
    --primary-color: #007aff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-gradient: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --input-text: #1a1a1a;
    --box-width: 420px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #333;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    /* Win11 同款：进入登录界面后背景模糊加深 */
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease, background 0.5s ease;
    z-index: 0;
}

body.login-mode .bg-overlay {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

/* ===== Win11 风格锁屏层 ===== */
.lock-screen {
    position: fixed;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 13vh;
    cursor: pointer;
    color: #fff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
    user-select: none;
}

/* 退场：上移淡出，贴近 Win11 点击锁屏后时间上移的感觉 */
.lock-screen.hide {
    opacity: 0;
    transform: translateY(-3vh);
    pointer-events: none;
}

.lock-time {
    font-family: 'Segoe UI Variable Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: 96px;
    font-weight: 500;
    letter-spacing: -2px;
    line-height: 1.05;
    font-variant-numeric: tabular-nums; /* 数字等宽，分钟跳动不抖动 */
}

.lock-date {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.lock-hint {
    position: absolute;
    bottom: 8vh;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 1px;
    animation: lockHintPulse 2.4s ease-in-out infinite;
}

@keyframes lockHintPulse {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 1; }
}

/* --- 官网图标（房子）：与地球语言按钮同款圆形毛玻璃样式 --- */
.official-link {
    position: fixed;
    top: 25px;
    right: 30px;
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.85);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    -webkit-tap-highlight-color: transparent;
}

.official-link svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke-width: 1.8;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.official-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.official-link:active {
    transform: scale(0.95);
}







/* Toast 容器 */
#toast-container {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-message {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.toast-icon {
    font-size: 16px;
}

.toast-error .toast-icon {
    color: #ff4d4f;
}

.toast-success .toast-icon {
    color: #52c41a;
}

.toast-info .toast-icon {
    color: #1890ff;
}

/* 主对话框 */
#login-box {
    position: absolute;
    width: var(--box-width);
    max-width: 90%;
    background: var(--glass-gradient);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.97);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

#login-box.is-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

#login-box.dragging {
    transition: none;
}

.box-header {
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    cursor: move;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.box-content {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slogan {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}





.form-group {
    width: 100%;
    margin-bottom: 10px;
}

.input-wrapper {
    display: flex;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

/* Caps Lock 开启提示（Win11 登录同款） */
.caps-hint {
    display: none;
    margin-top: 6px;
    font-size: 12px;
    color: #ffd666;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    text-align: left;
}

.caps-hint.show {
    display: block;
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.5);
}

/* 密码显示 / 隐藏 */
.pw-toggle {
    flex: none;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0 12px;
    font-size: 15px;
    line-height: 1;
    color: #555;
    display: flex;
    align-items: center;
    outline: none;
    transition: color 0.2s;
}

.pw-toggle:hover {
    color: var(--primary-color);
}

.area-code-select {
    background: transparent;
    border: none;
    padding: 0 10px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 14px;
    outline: none;
    color: var(--input-text);
    cursor: pointer;
}

input {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--input-text);
}

.btn-submit {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 12px 0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
}

.btn-submit:hover {
    background: var(--primary-color);
    border-color: transparent;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.6);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* 登录中转圈动画（Win11 风格） */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    margin-right: 8px;
    animation: btnSpin 0.8s linear infinite;
}

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-group {
    width: 100%;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.btn-secondary {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    border-radius: 8px;
    padding: 8px 0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: rgba(255, 255, 255, 0.8);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-wechat-style:hover {
    background: rgba(7, 193, 96, 0.5);
    border-color: transparent;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}



.qr-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.qr-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.qr-img {
    width: 180px;
    height: 180px;
    background: #ffffff;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.qr-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-text {
    font-size: 15px;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.qr-close {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s;
}

.qr-close:hover {
    color: #fff;
    border-bottom: 1px solid #fff;
}

@media (max-width: 480px) {
    #login-box {
        width: 94%;
    }

    .slogan {
        font-size: 18px;
    }

    .box-content {
        padding: 24px 20px;
    }

    /* 移动端加大次级按钮点击区，符合 ≥44px 可点性建议 */
    .btn-secondary {
        padding: 11px 0;
        font-size: 14px;
    }

    .qr-close {
        padding: 8px 12px;
    }

    .lock-time {
        font-size: 72px;
    }

    .lock-date {
        font-size: 18px;
    }
}
