/**
 * 三木游戏 - 密码验证模块样式
 * 可与 auth-module.js 配套使用
 */

/* 遮罩层 */
.auth-module-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: authModuleFadeIn 0.3s ease-out;
}

@keyframes authModuleFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 验证框 */
.auth-module-box {
    background: #fffbf3;
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-module-box-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.auth-module-box-hiding {
    opacity: 0 !important;
    transform: translateY(-20px) scale(0.95) !important;
}

/* 标题 */
.auth-module-title {
    font-family: 'Noto Serif SC', 'PingFang SC', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #3a2417;
    margin: 0 0 12px 0;
    letter-spacing: 2px;
}

/* 密码输入框 */
.auth-module-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid rgba(176, 96, 47, 0.25);
    background: #fff;
    font-size: 1rem;
    color: #3a2417;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    text-align: center;
    letter-spacing: 2px;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.auth-module-input:focus {
    outline: none;
    border-color: #b0602f;
    box-shadow: 0 0 0 3px rgba(176, 96, 47, 0.15);
}

.auth-module-input-error {
    border-color: #c04a3d !important;
    animation: authModuleShake 0.4s;
}

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

/* 错误提示 */
.auth-module-error {
    color: #c04a3d;
    font-size: 0.85rem;
    margin-top: -12px;
    margin-bottom: 12px;
    min-height: 20px;
    font-weight: 600;
}

/* 提交按钮 */
.auth-module-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    background: linear-gradient(145deg, #e2934f, #b0602f);
    color: #fff8ec;
    font-family: 'Fraunces', 'Noto Serif SC', serif;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 6px 16px rgba(176, 96, 47, 0.35);
}

.auth-module-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(176, 96, 47, 0.4);
}

.auth-module-btn:active {
    transform: translateY(0);
}

.auth-module-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* 按钮加载状态 */
.auth-module-btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.auth-module-btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: authModuleSpin 0.6s linear infinite;
}

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

/* 响应式适配 */
@media (max-width: 480px) {
    .auth-module-box {
        padding: 36px 28px;
    }

    .auth-module-title {
        font-size: 1.5rem;
    }

    .auth-module-input,
    .auth-module-btn {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
}
