/* ==================== 登录注册模态框样式 ==================== */

/* 模态框背景 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
}

/* 模态框内容 */
.modal-content {
    background: #ffffff;
    padding: 32px 36px;
    max-width: 420px;
    width: 90%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 关闭按钮 */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: #bbb;
    cursor: pointer;
    transition: all 0.3s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    font-weight: 300;
}

.modal-close:hover {
    color: #666;
    background: #f5f5f5;
    transform: rotate(90deg);
}

/* 头部区域 */
.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0;
    font-weight: 400;
}

/* 表单区域 */
.auth-form {
    margin-bottom: 20px;
}

/* 表单组 */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-of-type {
    margin-bottom: 20px;
}

/* 带图标的输入框容器 */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

/* 左侧图标 */
.input-icon-left {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #4A90E2;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s;
}

.input-with-icon:focus-within .input-icon-left {
    color: #357ABD;
    transform: translateY(-50%) scale(1.1);
}

/* 右侧图标按钮 */
.input-icon-right {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.input-icon-right:hover {
    color: #4A90E2;
    background: rgba(74, 144, 226, 0.08);
    transform: translateY(-50%) scale(1.05);
}

.input-icon-right:active {
    transform: translateY(-50%) scale(0.95);
}

/* 表单标签 */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

/* 表单输入框 */
.form-input {
    width: 100%;
    padding: 12px 44px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    background: #fafafa;
    color: #333;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
}

.form-input:hover {
    border-color: #d0d0d0;
    background: #f5f5f5;
}

.form-input:focus {
    background: #fff;
    border-color: #4A90E2;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: #aaa;
    font-weight: 400;
}

/* 表单选项行 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 复选框包装器 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.checkbox-wrapper:hover {
    opacity: 0.8;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4A90E2;
    transition: all 0.2s;
}

.checkbox-wrapper input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.checkbox-text {
    font-size: 14px;
    color: #666;
    user-select: none;
}

/* 忘记密码链接 */
.forgot-link {
    font-size: 14px;
    color: #4A90E2;
    text-decoration: none;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
}

.forgot-link:hover {
    color: #357ABD;
    background: rgba(74, 144, 226, 0.08);
}

/* 内联链接 */
.inline-link {
    color: #4A90E2;
    text-decoration: none;
    transition: all 0.2s;
    padding: 2px 4px;
    border-radius: 4px;
}

.inline-link:hover {
    color: #357ABD;
    background: rgba(74, 144, 226, 0.08);
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #357ABD 0%, #2868A8 100%);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* 底部区域 */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.footer-text {
    font-size: 13px;
    color: #888;
}

.footer-link {
    font-size: 13px;
    color: #4A90E2;
    text-decoration: none;
    font-weight: 600;
    margin-left: 6px;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.footer-link:hover {
    color: #357ABD;
    background: rgba(74, 144, 226, 0.08);
    transform: translateX(2px);
}

/* 表单错误提示 */
.form-error {
    display: none;
    margin-top: 8px;
    font-size: 13px;
    color: #f44336;
    padding: 8px 12px;
    background: #ffebee;
    border-radius: 6px;
    border-left: 3px solid #f44336;
}

.form-group.error .form-error {
    display: block;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group.error .form-input {
    border-color: #f44336;
    background: #fff5f5;
}

/* 成功状态 */
.form-group.success .form-input {
    border-color: #4caf50;
    background: #f1f8f4;
}

/* 加载状态 */
.btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
    cursor: not-allowed;
}

.btn-submit.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: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 576px) {
    .modal-content {
        padding: 28px 24px;
        max-width: 95%;
        border-radius: 14px;
    }

    .auth-title {
        font-size: 22px;
    }

    .form-input {
        padding: 11px 40px;
        font-size: 14px;
    }

    .btn-submit {
        padding: 12px;
        font-size: 14px;
    }

    .modal-close {
        top: 10px;
        right: 10px;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
}

/* ==================== 第三方登录样式 ==================== */

/* OAuth区域 */
.oauth-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* OAuth标签 */
.oauth-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* OAuth图标容器 */
.oauth-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* OAuth图标链接 */
.oauth-icon-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 3px 8px 3px 3px;
    border-radius: 18px;
    background: transparent;
}

.oauth-icon-link:hover {
    background: rgba(18, 183, 245, 0.05);
    transform: translateX(-2px);
}

/* QQ图标 */
.oauth-icon-qq {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #12B7F5 0%, #0E9FD8 100%);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(18, 183, 245, 0.2);
}

.oauth-icon-qq i {
    color: #ffffff;
    font-size: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.oauth-icon-link:hover .oauth-icon-qq {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 4px 16px rgba(18, 183, 245, 0.35);
}

.oauth-icon-link:hover .oauth-icon-qq i {
    transform: scale(1.05);
}

.oauth-icon-link:active .oauth-icon-qq {
    transform: scale(1.05);
}

/* OAuth文字 */
.oauth-text {
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.oauth-icon-link:hover .oauth-text {
    color: #12B7F5;
}

/* 响应式 */
@media (max-width: 480px) {
    .oauth-section {
        margin-top: 18px;
        padding-top: 18px;
    }

    .oauth-label {
        font-size: 12px;
    }

    .oauth-icon-link {
        padding: 3px 6px 3px 3px;
    }

    .oauth-icon-qq {
        width: 28px;
        height: 28px;
    }

    .oauth-icon-qq i {
        font-size: 15px;
    }

    .oauth-text {
        font-size: 12px;
    }
}

