/* 认证页面样式 */
:root {
    --auth-primary: #007AFF;
    --auth-primary-dark: #0062CC;
    --auth-bg: #f0f5ff;
    --auth-card-bg: #ffffff;
    --auth-text: #333333;
    --auth-text-light: #666666;
    --auth-border: #e0e0e0;
    --auth-error: #ff4d4f;
    --auth-radius: 16px;
}

.auth-container {
    min-height: 100vh;
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, var(--auth-bg) 0%, #e6f0ff 100%);
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--auth-card-bg);
    border-radius: var(--auth-radius);
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.1);
    padding: 50px 40px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-header h1 {
    font-size: 28px;
    font-weight: bold;
    color: var(--auth-text);
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 16px;
    color: var(--auth-text-light);
}

/* 登录方式切换 */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    color: var(--auth-text-light);
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn i {
    font-size: 16px;
}

.tab-btn:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

.tab-btn.active {
    background-color: white;
    color: var(--auth-primary);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
    font-weight: 600;
}

/* 表单样式 */
.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f8f8f8;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 14px 16px;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    background-color: white;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.input-group.error {
    border-color: var(--auth-error);
    background-color: #fff1f0;
}

.input-group .icon {
    color: #999;
    font-size: 18px;
    margin-right: 12px;
}

.input-group input {
    flex: 1;
    border: none;
    background: none;
    font-size: 15px;
    color: var(--auth-text);
    outline: none;
}

.input-group input::placeholder {
    color: #aaa;
}

.toggle-password,
.send-code-btn {
    background: none;
    border: none;
    color: var(--auth-primary);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    transition: opacity 0.2s;
}

.toggle-password:hover,
.send-code-btn:hover {
    opacity: 0.8;
}

.toggle-password:disabled,
.send-code-btn:disabled {
    color: #999;
    cursor: not-allowed;
}

/* 错误提示 */
.error-message {
    display: block;
    color: var(--auth-error);
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: var(--auth-text);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--auth-primary);
}

.agreement {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--auth-text-light);
    line-height: 1.6;
}

.agreement input[type="checkbox"] {
    margin-top: 2px;
}

.link {
    color: var(--auth-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.forgot-password {
    color: var(--auth-primary);
    font-size: 14px;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 按钮 */
.auth-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-primary-dark));
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

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

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

/* 底部链接 */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
}

.auth-footer p {
    font-size: 14px;
    color: var(--auth-text-light);
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.toast.success {
    background-color: rgba(76, 175, 80, 0.9);
}

.toast.error {
    background-color: rgba(244, 67, 54, 0.9);
}

.toast.info {
    background-color: rgba(33, 150, 243, 0.9);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-container {
        padding: 100px 16px 40px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .auth-header p {
        font-size: 14px;
    }

    .tab-btn {
        padding: 10px;
        font-size: 14px;
    }

    .input-group {
        padding: 12px 14px;
    }

    .input-group input {
        font-size: 14px;
    }

    .auth-btn {
        padding: 12px;
        font-size: 15px;
    }

    .agreement {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        border-radius: 12px;
    }

    .auth-header h1 {
        font-size: 22px;
    }

    .input-group {
        padding: 10px 12px;
    }

    .toggle-password,
    .send-code-btn {
        font-size: 12px;
        padding: 4px 6px;
    }
}

/* 加载动画 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background-color: white;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.loading-spinner i {
    font-size: 32px;
    color: var(--auth-primary);
    margin-bottom: 12px;
}

.loading-spinner p {
    color: var(--auth-text-light);
    font-size: 14px;
}
