/**
 * 用户认证模态框样式
 * 包含登录、注册表单的样式
 * 参考设计：毛玻璃效果，现代化UI
 */

/* ========== 模态框基础样式 ========== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 背景遮罩层（变暗效果） */
.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

/* 模态框容器 */
.auth-modal-container {
    position: relative;
    z-index: 10000;
    animation: slideIn 0.4s ease;
}

/* 模态框内容 */
.auth-modal-content {
    width: 400px;
    max-width: 90vw;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                0 0 60px rgba(255, 255, 255, 0.2) inset;
    position: relative;
}

/* 关闭按钮 */
.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border: none;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

/* ========== 标题样式 ========== */

.auth-modal-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;

    /* 明亮蓝紫渐变文字颜色 */
    background: linear-gradient(135deg, #5e9eff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    /* 更亮的光圈效果 */
    filter: drop-shadow(0 0 10px rgba(94, 158, 255, 0.6))
            drop-shadow(0 0 20px rgba(167, 139, 250, 0.4));
}

/* ========== 消息提示样式 ========== */

.auth-error-message,
.auth-success-message {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.auth-error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.auth-success-message {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

/* ========== 表单样式 ========== */

.auth-form {
    width: 100%;
}

.auth-form-group {
    margin-bottom: 15px;
    position: relative;
}

/* 输入框样式 */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    height: 50px;
    padding: 10px 20px;
    font-size: 16px;
    border: 3px solid transparent;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.6);
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-form input[type="text"]:hover,
.auth-form input[type="email"]:hover,
.auth-form input[type="password"]:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 123, 255, 0.3);
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.auth-form input::placeholder {
    color: #999;
}

/* 字段错误提示 */
.auth-field-error {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    margin-left: 20px;
    min-height: 18px;
}

/* 验证码输入组 */
.auth-verification-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.auth-verification-group input {
    flex: 1;
}

.auth-send-code-btn {
    flex-shrink: 0;
    height: 50px;
    padding: 0 20px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.auth-send-code-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-send-code-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 提交按钮 */
.auth-submit-btn {
    width: 100%;
    height: 50px;
    margin-top: 10px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.4);
}

.auth-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========== 表单切换样式 ========== */

.auth-switch-form {
    margin-top: 25px;
    text-align: center;
}

.auth-switch-btn {
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-switch-link {
    color: #a89b9b;
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
    transition: all 0.3s ease;

    /* 柔和的暖色光晕 */
    text-shadow: 0 0 8px rgba(168, 155, 155, 0.15);
}

.auth-switch-btn:hover .auth-switch-link {
    color: #887b7b;
    text-decoration: underline;

    /* 悬停时稍微增强光晕 */
    text-shadow: 0 0 10px rgba(136, 123, 123, 0.25);
}

/* ========== 动画效果 ========== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 响应式设计 ========== */

@media screen and (max-width: 480px) {
    .auth-modal-content {
        width: 95vw;
        padding: 30px 20px;
    }

    .auth-modal-title {
        font-size: 36px;
        margin-bottom: 20px;
    }

    .auth-form input[type="text"],
    .auth-form input[type="email"],
    .auth-form input[type="password"],
    .auth-submit-btn {
        height: 45px;
        font-size: 15px;
    }

    .auth-send-code-btn {
        height: 45px;
        padding: 0 15px;
        font-size: 13px;
    }

    .auth-verification-group {
        flex-direction: column;
        gap: 10px;
    }

    .auth-verification-group input,
    .auth-send-code-btn {
        width: 100%;
    }
}

/* ========== 加载状态 ========== */

.auth-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.auth-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
